`
sillycat
  • 浏览: 2550765 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Dealing with Optimizer(I)curl

阅读更多
Dealing with Optimizer(I)curl

1. Using cURL
http://code.google.com/apis/gdata/articles/using_cURL.html

Install curl
install this on my system
>sudo apt-get install curl

Getting an Authentication Token
the parameters of the command curl to google website
http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html

>curl https://www.google.com/accounts/ClientLogin \
-d Email=4myhappylife@gmail.com \
-d Passwd=your-password \
-d accountType=GOOGLE \
-d source=sillycat-3322-org \
-d service=analytics

Once succeed, we will get 3 import informations:
SID=
LSID=
Auth=

Accessing the API
curl --silent \
--header "Authorization: GoogleLogin auth=EUBBIacAAADK-kNxvRVmcQghpt3cqSMfEooLNMflLNIQqwgP9OrZS83gs-KSdTNeXhxsET7FYePWmaD8Vsy1V4LSUGMUP48Je2TO8OcjBj6HgAtPhiZeX-gKDfagZDK44j4n-Tkb44nhOnp2_QPSnBj3Z2vYwOEDjjG3Q53aQVC2132JKOuGh" \
-L "https://www.google.com/analytics/feeds/websiteoptimizer/experiments"

2 General Experiment Tasks
Request the experiment that you want to start.
>curl <BASE-OPTIONS> -L "https://www.google.com/analytics/feeds/websiteoptimizer/experiments/{experimentId}"

Save the returned XML description (e.g. as a file called experiment.xml).

Replace the current gwo:status from New to Running

After you've made this change, update the experiment.
>curl <BASE-OPTIONS> --request PUT --data "@experiment.xml" --header "Content-Type: application/atom+xml" -L "https://www.google.com/analytics/feeds/websiteoptimizer/experiments/{experimentId}"

Details in URL: http://code.google.com/intl/en/apis/analytics/docs/gwo/commonTasks.html

3.A/B Experiments
Create a new A/B experiment
Create a text file named experiment.xml that describes your experiment.
<entry xmlns='http://www.w3.org/2005/Atom'
       xmlns:gwo='http://schemas.google.com/analytics/websiteoptimizer/2009'
       xmlns:app='http://www.w3.org/2007/app'
       xmlns:gd='http://schemas.google.com/g/2005'>
<title>My new A/B experiment</title>
<gwo:analyticsAccountId>XXXX</gwo:analyticsAccountId>
<gwo:experimentType>AB</gwo:experimentType>
</entry>

Then create this experiment by sending a POST with this file to the experiments feed:
>curl <BASE-OPTIONS> --request POST --data "@experiment.xml" --header "Content-Type: application/atom+xml" -L "https://www.google.com/analytics/feeds/websiteoptimizer/experiments"

Add a new page variation to an A/B experiment
Create a text file named pagevariation.xml that describes your new AB page variation:
<entry xmlns='http://www.w3.org/2005/Atom'
       xmlns:gwo='http://schemas.google.com/analytics/websiteoptimizer/2009'
       xmlns:app='http://www.w3.org/2007/app'
       xmlns:gd='http://schemas.google.com/g/2005'>
<title>Page variation name</title>
<content>http://www.website.com/pagevariation.html</content>
</entry>

Then add the following page variation by sending a POST with this file to the experiment abpagevariations feed:
>curl <BASE-OPTIONS> --request POST --data "@pagevariation.xml" --header "Content-Type: application/atom+xml" -L "https://www.google.com/analytics/feeds/websiteoptimizer/experiments/{experimentId}/abpagevariations"


references:
http://code.google.com/intl/zh-CN/apis/analytics/docs/gwo/index.html
http://code.google.com/intl/en/apis/analytics/docs/gwo/index.html

分享到:
评论

相关推荐

    八年级英语Dealing with troublePPT课件.pptx

    这篇PPT课件是针对八年级英语教学的内容,主题为“应对困难”(Dealing with trouble)。通过一系列的填空练习和情景模拟,旨在帮助学生掌握如何在不同情况下正确处理问题,尤其是面对紧急情况时的应对策略。以下是...

    Dealing with Undesirable Outputs in DEA: A Slacks-based Measure(SBM) Approach

    在进行数据包络分析(Data Envelopment Analysis, DEA)研究时,经常需要面对的问题之一是如何处理非期望产出(undesirable outputs)。传统DEA模型在处理生产效率分析时通常假设决策单元(Decision Making Units, ...

    Image Processing:Dealing With Texture

    《图像处理:处理纹理》是图像处理领域内一部权威性的著作,由Maria Petrou和Pedro Garcia Sevilla两位学者共同编写,他们分别来自英国伦敦帝国理工学院和西班牙卡斯特利翁的Jaume I大学。该书由全球知名的学术出版...

    r scripts for dealing with mturk survey

    R scripts for dealing with mturk

    Dealing with stress.doc

    "Dealing With Stress" 这个主题的工作坊就是为此而设,旨在帮助参与者理解和管理他们面临的压力。 首先,我们要理解压力的来源。在大学生活中,学生面临的主要压力源包括: 1. **学术压力**:大学课程繁重,报告...

    Chapter 3 Dealing with trouble测试题2.doc

    Chapter 3 Dealing with trouble测试题2.doc

    dealing with hard people

    "Dealing with Hard People"这一主题,虽然看似不直接涉及技术,但它实际上对提升工作效率和团队协作至关重要。在这个知识领域,我们将深入探讨如何在复杂的职场环境中处理人际关系,特别是那些难缠的人物。 首先,...

    Dealing_With_Difficult_People (en)

    - - 与人交往中注意的一些容易被跳过的细节.以及基础理论分析与人交往出现的情况.

    八年级英语Dealing with troublePPT学习教案.pptx

    这篇PPT学习教案是针对八年级英语的一课,主题为"Dealing with trouble",旨在帮助学生学习如何处理各种突发状况。以下是对其中涉及的知识点的详细解释: 1. **词汇与短语**: - **hurry**:匆忙,表示动作迅速。 ...

    一个进行 Unicode 相关字符串转换的易语言库 An Eyuyan library dealing with Unicode string conversion.zip

    An Eyuyan library dealing with Unicode string conversion.Unicode-Eyuyan一个进行 Unicode 相关字符串转换的易语言库。一个处理 Unicode 字符串转换的 Eyuyan 库。背景 Background易语言是一个面向初学者的编程...

    Dealing with Audio Ground Loops

    音频地环回问题详解 音频地环回是音频系统中常见的问题,主要由于不同设备通过不同的路径连接到共同的地线而产生。这种多路径接地方式实际上就像一个天线,会拾取并引入干扰。当地环回发生时,地线(通常是屏蔽层)...

    处理不均衡数据 (深度学习)! Dealing with imbalanced data (deep learning)

    处理不均衡数据_(深度学习)!_Dealing_with_imbalanced_data_(deep_learning)

    ASTM E178 - 21 Standard Practice for Dealing With Outlying Obser

    标题中的"ASTM E178 - 21"指的是美国材料与...通过阅读提供的"ASTM E178 - 21 Standard Practice for Dealing With Outlying Observations - 完整英文版(11页).pdf"文件,可以深入学习这一标准的细节和具体实施步骤。

    MFC dealing with window size_IntheFrame_MFC实例_

    在Microsoft Foundation Class (MFC)库中,"MFC dealing with window size_IntheFrame_MFC实例_" 主题涉及如何在框架窗口(Frame Window)中管理子窗口(Subwindow)的大小。MFC是C++的一个类库,它为Windows应用...

    【Dealing with Data, User Defaults, SQLite, Web Services】[PDF] [iPhone/iPad/iOS]

    标题与描述中提到的知识点主要围绕在iOS应用开发中如何处理数据、用户默认设置(User Defaults)、SQLite数据库以及网络服务(Web Services)。以下是对这些关键概念的深入解析: ### 处理iOS应用中的数据 ...

    Introduction to Mathematica with Applications

    A chapter on several sorting algorithmsFunctions (planar and solid) with many interesting examplesOrdinary differential equationsAdvantages of Mathematica® dealing with the Pi numberThe power of ...

    Multi-Label classification: Dealing with Imbalance by Combining Labels

    ### 多标签分类:通过合并标签处理不平衡问题 #### 摘要与介绍 本文讨论了一个在多标签分类(Multi-Label Classification, MLC)领域中的常见问题——数据不平衡,并提出了一种新颖的方法来解决这一难题。...

    Pro Android with Kotlin

    There are chapters dealing with all the important aspects of the Android platform, including GUI design, file- and data-handling, coping with phone calls, multimedia apps, interaction with location ...

    071431_VB_picture_dealing_with.rar_vb matlab

    标题中的"071431_VB_picture_dealing_with.rar_vb matlab"指的是一个关于VB(Visual Basic)和MATLAB结合使用的图像处理压缩包。这个压缩包可能包含了一系列的VB代码和MATLAB脚本,用于图像的导入、处理和分析。 在...

Global site tag (gtag.js) - Google Analytics