How to Install Google Ads Tags Using Server-Side GTM

Started by 11s4kmqg2um, Nov 30, 2024, 07:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


SEO

Installing Google Ads tags using a server-side Google Tag Manager (sGTM) container is a more advanced but highly effective method for accurate conversion tracking, especially in an era of increasing browser restrictions and privacy concerns. This approach allows you to gain more control over your data, improve page speed, and enhance the accuracy of your tracking.

Here is a step-by-step guide on how to set up Google Ads tags using a server-side GTM container:

Prerequisites
Before you begin, you need to have a few things in place:

A Google Ads account with access to your Conversion ID and Conversion Label.

A Google Tag Manager (GTM) account with a standard web container already set up and installed on your website.

A server-side GTM container configured and connected to a tagging server (e.g., using Google Cloud Platform or a third-party service like Stape).

A Google Analytics 4 (GA4) setup sending data from your web container to your server container. This is the primary data stream that your server-side tags will use.

Step 1: Set Up the Conversion Linker Tag in the Server Container
The Conversion Linker is a crucial tag that stores the Google Click ID (GCLID) in a first-party cookie. This allows for accurate attribution by connecting a user's ad click to a subsequent conversion, even as browsers restrict third-party cookies.

In your server container workspace, go to the Tags menu.

Click New and choose the Conversion Linker tag type.

Set the trigger to All Pages (or a trigger that fires on all incoming requests to your server). This ensures the tag captures every ad click.

Save and publish the tag.

Step 2: Set Up the Google Ads Conversion Tracking Tag
This is the tag that will send conversion data to your Google Ads account.

In your server container, go to the Tags menu.

Click New and select the Google Ads Conversion Tracking tag type.

Enter your Conversion ID and Conversion Label. You can find these in your Google Ads account under Goals > Conversions > Summary.

Configure the conversion value and currency. You can use dynamic variables from the data layer to capture transaction-specific values.

Set up the trigger for the tag. This should be a custom trigger that fires on the specific event you're tracking (e.g., a "purchase" or "sign_up" event) from your GA4 data stream.

Save the tag and publish the container.

Step 3: Configure Enhanced Conversions (Optional but Recommended)
Enhanced conversions improve the accuracy of your conversion tracking by sending hashed, first-party data (like email addresses or phone numbers) to Google Ads.

In Google Ads: Turn on enhanced conversions in your Google Ads account under Tools & Settings > Conversions.

In the Web Container: Create a "User-Provided Data" variable. You can configure this to automatically collect data or manually pull values from your website's data layer.

In the Server Container: Go back to your Google Ads Conversion Tracking tag. Add a User Data parameter and set its value to the "User-Provided Data" variable you created in your web container.

Step 4: Set Up the Google Ads Remarketing Tag
A server-side remarketing tag allows you to build more accurate remarketing lists, as it is less susceptible to ad blockers and browser restrictions.

In your server container, go to the Tags menu.

Click New and select the Google Ads Remarketing tag type.

Enter your Conversion ID.

Set the trigger to All Pages to capture all user activity.

If you have an e-commerce store, you can enable "Send dynamic remarketing event data" to pass product details to Google Ads for dynamic ads.

Save and publish the tag.

Step 5: Verify Your Setup
Once your tags are configured, use GTM's Preview Mode to test the setup.

Open Preview Mode for your web container.

Open your website in a new tab.

In the GTM Tag Assistant, you should see the GA4 tags firing correctly and sending data to your server container.

Open Preview Mode for your server container and repeat the actions. You should see the incoming GA4 events being processed, and your Google Ads tags should fire on the relevant triggers.

Once you've verified everything is working correctly, publish your server container.













Didn't find what you were looking for? Search Below