Google Ads conversion tracking with server-side tagging in Google Tag Manager – News Couple
ANALYTICS

Google Ads conversion tracking with server-side tagging in Google Tag Manager


One of the biggest server-side tagging blockers in Google Tag Manager to break out of beta He is Google ads. Even server-side tagging supports a solution to both Transfers And Remarketing Server-side reproducibility, server containers are unlikely to lose their beta label.

While I can’t say what will happen to the beta naming now, the truth is that Google Tag Manager Now release support for conversion tracking Using server-side tags.

The whole thing… is interesting, because it not only includes From server to seller calls, but also From browser to server to browser to vendor requests. why? You probably guessed it: Third Party Cookies.

In this article, I’ll show you how to set things up (surprisingly simple), and I’ll also try to shed some light on how the whole setup works (surprisingly difficult).

Here is the official documentation about Google ads and server-side tagging: Google Ads (Google) conversions.


X


Simmer . Newsletter

Subscribe to the Simmer newsletter to get the latest news and content from Simo Ahava right in your inbox!

Ingredients you will need

In the web container, you need to reconfigure the file Google Analytics 4 Configuration flag to send data to the server container using a file Send to server container Selection. This replaces transport_url The setting you will be using so far.

Noticeable! Server-side tagging with Google Ads Only works with Google Analytics 4. it will be Not Work with Universal Analytics tags.

The point here is that you will use the GA4 web tag(s) to send the conversion events to the server container, where they will be set accordingly.

In the server Container, you will need these two tags:

  • a conversion link Tag to send landing page signals to Google as well as to write first-party cookies with ad click information.
  • Google Ads Conversion Tracking Tag(s) to keep track of the conversions themselves.

Both are new built-in tag templates in all server containers.

Let’s start from the top.

Web: update the GA4 config tag

For Google Ads setup to work, you’ll need to update a file Google Analytics: GA4 Configuration Tag to use a file Send to server container setup, and you’ll need to Removal The transport_url field.

Send to server container

You need to fill out a file Send to server container Setting is exactly the same value you filled in transport_url with the the origin For the server container, i.e. a URL up to a path specifier. See the image above for an example.

How it works

When you set a file Send to server container Setup, does two things.

  1. It defines the transport_url To point to the server container.
  2. It defines the first_party_collection domain for true.

The second is very important in this scenario. The purpose of this field is to tell the GA4 (in the web) that the target device is Not A computer owned by Google Analytics. This means that it enables the protocol to share potentially sensitive data, since the server container is something owned by the company that runs the website (hopefully) and not Google Analytics.

when first_party_collection Enabled, GA4 will use a new protocol that allows the server container to communicate Back to the browser.

Reply from the server using the new protocol

This protocol is basically a response message, which is then parsed by GA4 web tags, and they will react accordingly (for example, sending the request to DoubleClick domain as in the example above).

We will return to this topic, but suffice it to say that this is done Because conversion tracking is still used Third Party Cookies.

Server: Create conversion link tag

In the server container, create the new conversion link tag. You’ll find it in the list of included tag templates.

conversion link

There is a new built-in player called all pages in the server container. Add that to the tag, as you’ll want to activate the conversion link on all pages.

The all pages Launching fires whenever there is a named event page_view Created by a server container client.

How it works

The conversion link tag does two things.

  1. send file landing page beacon to the Google Ads server.
  2. If the page URL has the extension gclid parameter, or if there are Google Ads first-party cookies in the request, the tag will set the new file FPGCLAW Cookie in reply, write click id for storage.

The landing page signal is sent to Google's ad servers

The landing page signal is sent to Google’s ad servers

The landing page tag is not descriptive at all. It’s just a test of Google Ads with the current URL. Naturally, the URL may contain the extension gclid parameter, so I think this is used to validate clicks on ads.

FPGCLAW cookie written with 3-month expiration

FPGCLAW cookie written with 3-month expiration

The FPGCLAW The cookie appears to only duplicate pre-existing Google Ads cookies in that it writes the Google Ads Click-ID into the first-party cookie. Of course, as in the file Set-Cookie Server response, it is better to protect trace protection.

Server: Create a Google Ads Conversion Tracking Tag

Then, you can go ahead and create a file Google Ads Conversion Tracking mark on the server. You can configure it just as you would configure the same tag in a web container.

Google Ads Conversion Tag

Set it to whatever operator you want to use for that particular conversion. In the example above, I’m using a file add_to_cart The event generated by the GA4 client.

How it works

This is where things get interesting.

If there is a first party click identifier available, such as stored in FPGCLAW With the conversion link tag, the server container sends the conversion event directly to the Google Ads servers.

Hit Google Ads Convert

This is a “normal” conversion request from Google Ads. Contains the conversion ID, conversion label, and click ID in a file gclaw parameter, among other things.

But when you then look at a file Response Back from the Google server, you’ll see that it’s a 302 redirect to the DoubleClick domain.

DoubleClick Conversion

why? Since the conversion tag in Google Ads needs to contact the DoubleClick domain to associate the conversion information with the user’s identity, this requires DoubleClick to read its cookies in the context of the third party.

butSince the server container cannot work with third-party cookies, things get complicated.

What happens is that HTTP response back from the server (ie for add_to_cart event) on a message directing GA4 library in the browser Create a DoubleClick request instead.

Server response to add to cart

And sure enough, if you look at network requests (in a browser that supports third-party cookies), you’ll see browser requests to Google’s servers:

Google server requests

In the case of the browser No First party click identifier information stored, server container No Send a direct request to Google’s servers. Instead, it only directs the browser to send requests, so that third-party cookies can be captured.

Please don’t ask me what happens if your browser doesn’t support third-party cookies. I think if click id is present, your conversion metric will work fine. However, there may be limitations on the type of audiences you can use or create for conversion tracking, because the click and conversion cannot be attributed to a general Google user without third-party cookies.

Likewise, if the click-id of the first party is Not Available, I believe Google uses third party cookies to see if a user has interacted with the ad though. So you will lose this precaution if third party cookies are not supported.

What about approval status? What happens if ad_storage unacceptable? Or what if it was granted later?

for the first time conversion link The tag sends the landing beacon ping to Google servers, but does not write the FPGCLAW biscuit in an HTTP response.

The landing page flag includes parameters that indicate that consent mode is active. This instructs Google to ignore any identifiers in the request and only collect anonymous data for conversion modeling.

Approval mode parameters in the ping link

The conversion tracking tag The request is sent from server to server normally, whether or not the first party click ID is available:

Transfer tracking without consent

If the page URL has the extension gclid parameter, it will be sent to Google Ads (no advertising cookies are required in this scenario).

ping conversion with click id

If, however, agree the changes to me Certainly, RFID web tag GA4.

The page_view Immediately hit the server container. This time it has no consent restrictions, so both GA4 tags and Google ad tags will be able to take advantage of the usual cookie-enabled ping.

This means that the conversion link (assuming it’s fired on all pages) will fire again and this time rewrite a file FPGCLAW biscuit.

in addition to , Any other event that you have marked as a conversion in the Google Analytics 4 user interface will Moreover It is sent again.

In other words, if you want a file add_to_cart Google Ads conversion event will be sent with cookies and full capabilities Once consent is granted you have to go into Google Analytics 4 UI and tick add_to_cart event as a conversion.

add_to_cart as transfer

The GA4 user interface will point to a file gtag.js library account add_to_cart The conversion occurred when results were submitted again after approval was granted. You have to do this for everyone Events you want the library to send back once approval is granted!

Noticeable! Even though the results are sent back, the server container will prevent the tags from running again unless you support them ad_storage.

By the way, this applies to analytics_storage Well (of course nothing is sent to ads in this case). when analytics_storage is set to 'granted', GA4 compiles a file page_view and all conversion events that do not contain cookies that were previously sent back automatically.

New API

Finally, there is a new API for the custom template: sendPixelFromBrowser. This API works with the GA4 web tag. If the API is called and the request is generated from a GA4 web tag, the API sends the pixel request back to the browser using the same protocol as the Google ad tags above.

The GA4 web tag captures these instructions and sends the request via the browser.

This means that other vendors who require third-party cookies to run can use this API to design their templates for browser use rather than direct server-to-server clicks.

Noticeable! This is amazing Just Works with the GA4 web tag. If the request comes from another sending source, the API will not work as intended.

summary

As you can see, setting up Google Ads tracking is very simple. but understand flow It is really something else.

I’m actually somewhat disappointed with how the setup works. I’m not saying I don’t think it’s a good program – it is! I just don’t like the fact that it relies on third party cookies.

Forcing the browser to do all the legal action means that some of the most important security advantages of server-side tagging (reliance on first-party connections only, stricter content security policies) have to be abandoned in favor of getting more data.

I wonder why Google doesn’t push more aggressively for a first-party only approach like Enhanced Conversions. I’m not a big fan of this either, but at least the website and server-side tagging will retain control, rather than give it up to third party requests that originate in the browser.

Google may wait for a decision on the Privacy Sandbox initiative before making drastic changes to its data collection methods. Who do you know?

Well anyway. I think this Google Ads setup is very neat because it is so simple frictionless (The above issues with security though). Setting it up is just as “easy” as setting up the respective components in a web container.

I think browser routing protocol to do something is a work of genius, but I’m concerned about increasing reliance on GA4 and gtag.js for server-side tagging to work its magic. It’s not a trend I’d like to see more of in the future, but I have a hunch that Google will push for tighter, tighter integration over time.

Please let me know in the comments if you have any ideas to share on this topic!



Source link

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button