AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Ads
3.7K members online now
3.7K members online now
Get started with Google Ads - learn the basics to get set up for success
Guide Me
star_border
Reply

Documentation regarding cookies for developers

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi. I work at an agency and I have to know how exactly AdWords deals with its cookies. Some of our customers use external payment gateways (such as Paypal) and the user is not guaranteed to go back to the thank you page, where the conversion tag should be fired.

 

I have searched a lot and there are some ways to deal with such payment flow, but most articles I have found only deal with basic examples, such as fill a lead form. Most of my customers have ecommerces, and after taking a look at some alternatives, I believe the best way would be to implement off-line tracking.

 

Unfortunately, Google documentation only deal with a simple lead form. I would like to know if there are some in-depth documentation explaining how could I do this for ecommerces. The setup will most likely be the same as for the lead form, but I need to know exactly how AdWords manages cookies so I can "fire" the tag in my off-line tracking. Things like this:

 

1: User clicks an ad, goes back to Google, and clicks a different ad. Does the first cookie get replaced, or both are saved?

2: User clicks an ad, makes a conversion and sees the thank you page. The tag gets fired. Now, if the user refreshes the thank you page, would the tag fire again with the same cookie or the cookie is marked as already "used" in some way?

 

So far, I'm thinking about designing things like this:

1: The cart has an ID.

2: Every time the user gets to the checkout page (before payment and the thank you page), I read the AdWords cookie ID and save it to the cart. This way, even if the user has multiple interactions with the cart and the site as a whole, I would always have the most recent AdWords cookie.

3: The user proceeds to the payment gateway. Even if the user does not come back to see the thank you page, I still have the most recent cookie in the back-end associated with the cart.

4: If the payment is confirmed, then I can use the cookie stored in the database in order to track the conversion.

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by MosheTLV (Top Contributor)
February 2016

Re: Documentation regarding cookies for developers

Top Contributor
# 2
Top Contributor
Hi Der L,

I can answer some of this.
I'm going to assume you are talking about the AdWords conversion code. That runs with a 3rd party cookie that gets sent to Google when the AW conversion code runs. That means you can't read that cookie.

Ok, your first set of questions:
1. This depends on your attribution model, but by default the conversion is attributed to that last action. Previous actions could be shown as "contributed".
2. Google support says refreshing the thank you page will not result in recording a new conversion.

Now for your plan.
1. The cart has an id, that's good.
2. You can't read the cookie. this is too late in the process to get the gclid. The only time the gclid is available to you is on the landing page after a click on your add. You need to capture this at that time. There are a few way to do this, I use a local cookie.
3. If the user does not come back to your thank you page, you can upload the conversion after confirming payment was made.
4. Correct, more or less. You can track it as a conversion in your db and/or upload the conversion data to AW to get AW conversion reports to match your internal reporting. I wouldn't expect 100% capture of the data.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords

View solution in original post

Marked as Best Answer.
Solution
Accepted by MosheTLV (Top Contributor)
February 2016

Re: Documentation regarding cookies for developers

Top Contributor
# 2
Top Contributor
Hi Der L,

I can answer some of this.
I'm going to assume you are talking about the AdWords conversion code. That runs with a 3rd party cookie that gets sent to Google when the AW conversion code runs. That means you can't read that cookie.

Ok, your first set of questions:
1. This depends on your attribution model, but by default the conversion is attributed to that last action. Previous actions could be shown as "contributed".
2. Google support says refreshing the thank you page will not result in recording a new conversion.

Now for your plan.
1. The cart has an id, that's good.
2. You can't read the cookie. this is too late in the process to get the gclid. The only time the gclid is available to you is on the landing page after a click on your add. You need to capture this at that time. There are a few way to do this, I use a local cookie.
3. If the user does not come back to your thank you page, you can upload the conversion after confirming payment was made.
4. Correct, more or less. You can track it as a conversion in your db and/or upload the conversion data to AW to get AW conversion reports to match your internal reporting. I wouldn't expect 100% capture of the data.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords

Re: Documentation regarding cookies for developers

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Yes, you are correct regarding the local cookie and landing page. If I'm not mistaken, Google support page dealing with tracking off-line conversions gives example codes that capture the GCLID and set it in a local cookie.

Anyway, in order to send the conversion to AdWords from my back-end then do I just need the GCLID captured in the landing page (and stored in a local cookie)? Or do I have to make some kind of parsing of Analytics cookies also?

Re: Documentation regarding cookies for developers

Top Contributor
# 4
Top Contributor
Hi Der L,

Uploading offline conversions is something I have not done. You don't need to parse the Analytics cookies to do this, just the gclid along with other conversion data like date and amount. All the source tracking data is encoded in the gclid.

Pete
petebardo -- Deadhead doing AdWords