English 中文(简体)
How to capture if a visitor is from a google adwords click
原标题:

When a user signs up on my site I want to be able to store whether or not they came to my site via an Adwords campaign.

I know google uses javascript to track conversions based on a cookie that is created on the users machine. Is there a way I can check this cookie so I can store the source against the user account?

最佳回答

You re correct--you can read this data from the cookies.

To configure the tracking:

  1. connect your adwords and GA accounts:

  2. in your AdWords account, go to My Account > Account Preferences, click the "edit" link next to Tracking then select the box that says "Destination URL Auto-tagging". Click "Save Changes";

  3. still from your AdWords account, click the Analytics tab and choose Analytics Settings > Profile Settings > Edit Profile Information; check "Apply Cost Data", then click Save Changes

So how can you tell if it s working? And where does GA store the data?

Grab an initial __utm.gif request and look at the Referer. Appended to the URL is a new parameter "gclid." This is the keyword-specific parameter (unique to your account). It s this parameter that distinguishes your visitors as AdWord-originating (i.e., "google(cpc)") from "google(organic)" Here s one i just grabbed and anonymized (scrambled the numbers/letters):

Referer: http://www.adomainname.com/?gclid=CKr61p31yKACFZlg4wodjj3gbA

You ll see this identical string in two other places in the same tracking pixel request:

(i) as the value for the GIF Request Parameter "utmp" which is the page request for the current page, and, most importantly;

(ii) as the value for the GIF Requests Parameter "utmcc"--the container for the cookies. The specific cookie that holds the adwords data is __utmz, which is actually the container for all referral data. Here s an anonymized example i just grabbed more or less at random (i.e., i just did search in Google using a query comprised of obvious Adwords and then clicked one of the paid links in my search results, then just pulled the Request Header):

utmcc=__utma%3D755416178.1576730350.1269876846.1269143846.1269143846.1%3B%2B__utmz%3D219726107.1269143846.1.1.utmgclid%3CKr61p31yKACFZlg4wodjj3gbA%7Cutmccn%3D(not%2520set)%7Cutmcmd%3D(not%2520set)%7Cutmctr%3Dhomes%2520for%2520sale%3B HTTP/1.1

问题回答

You could add an additional url parameter to the url you gave at google adwords, and check for it on your site and store in a session variable or cookie.

At registration of a user account check for this session or cookie you have created and act accordingly..

I know this already has an accepted answer but it s very out of date. The updated way can be found here: https://support.google.com/analytics/answer/1033981?hl=en

C+P d:

In order for Analytics to display details about your AdWords keywords and costs, you must do one of the following:

Enable auto-tagging. This is the recommended approach and ensures that you get the most detailed AdWords data. Manually tag all your keyword final URLs with tracking variables. You should only do this in the special cases outlined below.

How auto-tagging works Auto-tagging automatically imports AdWords data into Analytics. Combining AdWords data with the rich post-click information provided by Analytics allows you to see what happened on your site after people clicked on your ads.

When you enable auto-tagging, a parameter called gclid is added to your landing page URL when a user clicks over to your site from an ad. For example, if your site is www.mysite.com, when a user clicks on your ad it appears in the address bar as:

www.mysite.com/?gclid=123xyz

Enable auto-tagging To enable/disable auto-tagging:

Sign in to your AdWords account. Click the gear icon, and select Account settings. Make sure you re on the Preferences tab, and click Edit in the Tracking section. Select (enable) or clear (disable) the Auto-tagging checkbox. Click Save changes.

You could always provide an adwords-specific landing page. That way you have a lot freedom to do whatever you want with the incoming adwords user...





相关问题
nginx/redis and handling tracking params in url

I am using nginx and redis in my website. For several items on my site, I want to add tracking params to their urls so that when a user clicks on an item, I can collect statistics of user usage apart ...

Tracking and logging anonymous users

If you let anonymous users vote for any post on a site just one time and you log that vote by the user s IP, what s the likelihood that you d be banning other users from voting and that the original ...

Custom click tracking for adsense

I need to identify my users when an ad is clicked. For example, when user A is online, I need to know that he was the one who clicked the ad unit. When using my own ads, this was a piece of cake (...

Tracking Objects in Videos [closed]

Are there any open Source libraries for tracking objects and over-laying graphics in videos ? Specifically, to create effects similar to the products offered in the below link :- http://www.orad.tv/...

Tool to track use of "best practices" for each of our apps

We have over 100 applications in my company and we are trying to come up with a dashboard to show which applications use continuous integration and unit testing and other best practices. I was going ...

How to manage a pageview DB

I am interested in tracking my users pageviews on my site. Being that traffic is expanding very quickly, I am worried about robots, etc, and I also want to be able to use tracked data live to alter ...

Track Improvement Requests

We receive 5-10 improvement requests each day from our customers. Some of them are good, and some not so good. I can easily pick out the ones that I agree with, but I d like a good way to organize ...

热门标签