Resource Center

Tracking Optimization - Upgrade Pixel to Google Tag Manager

_________________________________________________________________________________

This article will review:

  • How to upgrade your existing pixel tracking solution to Partnerize's Google Tag Manager

_________________________________________________________________________________

Index

_________________________________________________________________________________

Overview

As web browsers (e.g Safari/Chrome) adopt measures to deprecate 3rd party cookies, traditional pixel-based tracking solutions may be affected. If you currently use Google Tag Manager (GTM) for sales tracking, this guide explains how to leverage Partnerize's GTM solution to future-proof your brand.

 

The Partnerize GTM integrations requires the implementation of two templates:

  1. Capture Partnerize Click Reference Template
    • Store Partnerize's unique ID (clickref) from the brand’s landing pages in 1st party context
    • This reduces reliance on 3rd party cookies for more reliable tracking
  2. Partnerize eCommerce Tag Template
    • Utilize GTM dataLayer to automatically format and transfer sale data to Partnerize requiring minimal development effort

 

Prerequisites

Before proceeding please ensure : 

  • You currently have the standard Partnerize pixel implemented directly on your confirmation pages 
  • Your Google Tag manager  dataLayer adheres to the following formats GA4Enhanced 

_________________________________________________________________________________

Implementation Overview

For a seamless transition from your old pixel solution to the new GTM template without impacting live activity, please follow :

Stage Description Owner
1.Configure Clickref template

Import / configure "Capture Partnerize Click Reference" Template

Brand
2.Auto append "clickref"

Partnerize will automatically pass a unique click identifier (clickref) into each destination page, essential for the proper operation of the feature

Partnerize
3.Configure eCommerce tag

Import / configure relevant Partnerize eCommerce Tag Templates

Brand
4.Implement "TEST-" campaign ID

A "campaign:TEST-" conversion tag is implemented at checkout in conjunction with the current live pixel

 

NOTE: DO NOT remove the current live pixel

Brand
5.Notify Partnerize Inform Partnerize when implementation complete Brand

6. Review "TEST-" data

Feedback on performance & syntax of the 'campaign:TEST-' tag

Partnerize
7. Switch GTM solution

Migrate to new Partnerize GTM solution

Brand
8. Testing (optional)

Brand conduct a test once switch over complete

Brand
9. Monitor performance

Keep close eye over sales and report any issues to Partnerize

Brand / Partnerize

 

_________________________________________________________________________________

Implementation Steps

1.Configure Clickref template (Brand)

For Partnerize referred traffic, a unique ID (clickref) is appended to the brand's website. This template captures and saves the Partnerize Click Reference from the landing pages. The clickref is automatically retrieved at the point of purchase and added to the conversion tracking pixel for a 1st party cookie tracking solution.

❗NOTE: This tag MUST be deployed on all possible landing pages.

 

1.1 Import Clickref Template

  • Navigate to “Templates” section of Google Tag Manager
  • Click on “Search Gallery” to open the Template Gallery section
  • Search for “Partnerize” in the search box and all Partnerize templates will appear
  • Click on the “Capture Partnerize Click Reference” template, and a window will transition in, allowing it to be added to the current Workplace. Click on “Add to workplace”
  • On the screen that appears, the user will see a confirmation window which provides information about the permission the template will require and all it will access

1.2 Clickref Template Permissions

Screenshot_2021-02-19_at_14.45.55.png

These are the required permissions for the template to be added:

  • Logs to console - Allows debugging messages to be outputted in the developer console of the window while in preview mode.
    • It will output the full pixel url along with the data parameters being sent into it.
  • Reads URL - Allows access to landing page URL to retrieve the clickref value
  • Accesses local storage - Allows access to local storage to set and retrieve data from the current browser’s local storage.  

Click on the “Add” button to add the template to the current Workplace.

 

1.3 Set Up Clickref Tag

The user can implement the tag and the triggering rules.

  • Click on the “Tags” link in the left pane > Click “New” to create a new tag: 

Screenshot_2021-02-19_at_14.49.02.png

  • A new window will appear.  Click “Tag Configuration”
  • Another new window will appear.  Locate and choose the ‘Capture Partnerize Click Reference’ template previously installed
  • Click “Triggering” and set the firing rules to trigger on “All Pages”:

Screenshot_2021-02-19_at_14.49.40.png

  • Click “Save” to save changes > Click “Submit” to commit the changes:

Screenshot_2021-02-19_at_14.50.35.png

 

_________________________________________________________________________________

2.Auto append "clickref" to all referred traffic (Partnerize)

Partnerize will configure the redirection to always include a unique ID ("clickref") within the query string.

  • E.g) https://www.brand-site.com?clickref=ABC1234

Whenever a new click is initiated, a new "clickref" is generated and updated.

  • E.g) https://www.brand-site.com?clickref=DEF456

This will be read by the Capture Partnerize Click Reference template, upon checkout the most recent "clickref" present will be used to reward "last click" wins.  

_________________________________________________________________________________

3.Configure Ecommerce tag (Brand)

Partnerize provides GTM conversion templates tailored to the brand's dataLayer structure, given it aligns with Google's recommended format

  • Partnerize GA4 eCommerce Tag :   Uses the GA4 dataLayer format as specified here
  • Partnerize Enhanced eCommerce Tag :  Uses the Enhanced dataLayer format as specified here
  • Partnerize Standard eCommerce Tag  : Uses the Standard dataLayer format here

All templates send transactional data from the brand's website to Partnerize. They automatically extract sale information from the relevant eCommerce dataLayer in GTM, populating the Partnerize tracking pixel. Working alongside the Partnerize Click Reference template, they retrieve the stored clickref from the current browser's local storage/1st party cookie, reducing dependence on 3rd party cookies.

NOTEThis tag should be deployed on confirmation event pages where the brand wants to send the transaction data to Partnerize.

 

3.1.1 How to import Partnerize GA4 eCommerce Tag Template

NOTE: As of June 2023 this template is still awaiting Google to publish, so will not appear within the "Search Gallery" therefore requires manually accessing the raw version of the template

 

Follow these steps if you have GA4 dataLayer : 

  • Go to your GTM environment, create a new template 

  • Import the .tpl file. This will then add this to your template gallery

  • Save

 

 

3.1.2 How to import Enhanced eCommerce Template

Follow the steps if you have Enhanced dataLayer

  • Navigate to the “Templates” section of Google Tag Manager
  • Click on “Search Gallery” to open the Template Gallery section
  • Search for “Partnerize” in the search box and all Partnerize templates will appear
  • Click on the “Partnerize Enhanced eCommerce Tag” template, and a window will transition in, allowing it to be added to the current Workplace. Click on “Add to workplace”
  • On the screen that appears, the user will see a confirmation window which provides information about the permissions the template will require and all it will access

 

NOTE:

  • If brand's dataLayer does not match Google's recommended structure Partnerize's GTM templates will not be compatible without manual adjustments
  • Since this tag is based on the usage of Google Tag Manager’s “dataLayer” the pixel should not fire until this “dataLayer” is ready and populated. This may not be when the page first loads.

 

3.2 eCommerce Permissions

Once templates are imported these are the required permissions :

  • Logs to console - This allows the template to put output in the developer console of the window while in preview mode. This will allow for easier debugging if the client runs into issues. It will output the full pixel url along with the data parameters being sent into it.
  • Sends Pixels - This allows the pixels that fire upon confirmation to be sent to Partnerize
  • Reads Data Layer - This is required to get the ecommerce data from the dataLayer and populate it into the tag
  • Accesses local storage - This allows the template the access local storage to set and retrieve data from a 1st party cookie

Click on the “Add” button to add the template to the current Workplace.

 

 

_________________________________________________________________________________

4. Implement "TEST-" conversion tag (Brand)

To maintain normal LIVE pixel tracking during testing of the new solution, we recommend implementing the "campaign:TEST-" version. This should be set to fire alongside the current pixel tracking solution

IMPORTANT : DO NOT REMOVE the existing LIVE pixel tracking solution

 

4.1 Configure "TEST-" campaign ID

  • Click on the “Tags” link in the left pane > Click “New” to create a new tag
  • A new window will appear.  Click “Tag Configuration”
  • Another new window will appear.  Locate and choose the appropriate Template installed in Step 3
  • Enter the campaign ID and prefix with "TEST-XXXXXX"
    • XXXXXX will be replaced by your campaign ID
    • This can be provided by Partnerize Integrations team

mceclip2.png

  • Enable the voucher code parameter, if required
  • Custom conversion level parameters can also be added by clicking on the “Add Row” button. This will show a table view to provide a parameter and value
    • These could be parameters/values that are NOT part of the dataLayer that the brand wants to include (i.e. anything stored in Google Analytics / any hard coded values / etc.)
  • Otherwise, the template code automatically reads the data from the dataLayer and populates the relevant parameters in the Partnerize tag, and formats the pixel correctly.
  • For example, the highlighted code below reads the value from the ecom.purchase.actionField.id variable from the dataLayer, and passes that into the Partnerize “conversionref” parameter:

Screenshot_2021-02-19_at_14.54.17.png

  • The brand could customize the above code as much as necessary.  For example:
    • i.e. rather than referencing ecom.purchase.actionField.id for their order ID / conversionref, update this code to reference the correct parameter from their dataLayer
    • Omit certain variables from the Partnerize pixel, by commenting out the relevant lines of code
    • Change parameter names by updating the code above
    • If the brand IS NOT using the 'Enhanced eCommerce' dataLayer on their site, they could still use the code template above but change the code where necessary to reference their own Data Layer
    • If there is data available which is not directly within the dataLayer, this can be added to the tag using the ‘Add Row’ feature within Tag Configuration, and entering the required parameter name and variable.
  • The above code can be accessed within the Tag Templates section GTM, under Template Editor

4.2 Customize Country Tracking

Partnerize allows global brands the ability to track the “country” of purchase.  This is extremely beneficial to identify which market generates the most spends and report back within the Partnerize platform. 

Within Tag Configuration section 

  • Add Row > “Parameter Name” with be mapped to “country” 
  • “Parameter Value” will be mapped to the client variable that contains country value ( if available ) > Save

NOTE: The country code must conform to the ISO 3166 two letter country code (eg. GB, US)

 

4.3 Trigger Configuration

  • The brand will need to set up the trigger condition for when GTM should fire the Partnerize pixel.  This should be configured based on the event for which they want to pass sale data to Partnerize
  • The example trigger below would fire the pixel whenever the 'completeCheckout' event occurs:
  • Click “Save” to save changes > Click “Submit” to commit the changes:

Screenshot_2021-02-19_at_14.56.52.png

NOTE: This GTM cache busting feature should NOT be enabled for the Partnerize integration.  To check if this is enabled, or to disable it:

  • Navigate to Tag Configuration
  • If checked, disable ‘Enable Cache Busting’ > Click Submit and Publish the changes

 

4.4 Exclusive Codes Functionality

The GTM conversion should be triggered at point of checkout and typically when a "clickref" value is present. If a brand wishes to utilise Partnerize's exclusive code functionality https://help.phgsupport.com/hc/en-us/articles/4405844671377 it is essential that vouchers are passed into the 'voucher' parameter.

 

Exclusive Codes also introduces the concept of clickless tracking, allowing brands to work with non-traditional partnerships who don't work with tracking links. In order to utilize clickless tracking, a brand must trigger the tracking unconditionally for every sale regardless if a clickref value is present.

 

The "clickref" parameter can be left empty as "/clickref:/"

 

NOTE:  Even though  tracking is loaded for every sale Partnerize will only attribute sales that were referred by our partners.

_________________________________________________________________________________

5. Notify Partnerize (Brand)

Once "campaign:TEST-" conversion tag is implemented to run in conjunction with your LIVE pixel, please inform the Partnerize Integrations team integrations.support@partnerize.com

Your system should be set up so when live transactions take place, Partnerize will see 2 entries in our logs :

  • Live Pixel (v1)
  • TEST- conversion tag  (v2)

The live pixel (v1) will continue to track your current activity so no disruption is made to reports / partners and the "campaign:TEST-" (v2) will help the team review implementation. 

_________________________________________________________________________________

6. Review "TEST-" data (Partnerize) 

Partnerize will monitor and compare the live pixel (v1) against "campaign:TEST-" (v2) conversion tag to make sure everything is correct before advising the brand when to make the switchover.

Partnerize will check the following during this process:

  • Live pixel tracking is continuing as normal
  • The volume of "campaign:TEST-" (v2) conversion calls matches the volume of live pixel (v1)
  • Tracking syntax and data parameters across both versions matches 
  • The "campaign:TEST-" (v2) includes a valid "clickref"  

_________________________________________________________________________________

7. Switch GTM solution (Brand)

Providing there are no issues with the data analysis, to switch over : 

  • Brand to remove 'TEST-' prefixed to campaign parameter thus making it live
  • Remove the old (live) pixel
  • Informing Partnerize Integrations team that the above three steps have been actioned

Screenshot_2021-02-19_at_14.56.04.png

 

NOTE

  • Strongly advise brand tracks the Partnerize landing page tag for the duration of the campaign cookie period (E.g 30 days) BEFORE the switchover.
  • This ensures any conversions made from clicks prior to the switch over will still track.

_________________________________________________________________________________

8. Testing (Brand)

From data analysis in step 5, both brand / Partnerize will be confident tracking works before the switch over. However, Partnerize would recommend a test transaction via the brand's live website is conducted. Full testing instructions can be found here: https://help.phgsupport.com/hc/en-us/articles/360019824018-Testing-Tracking-Solutions-FAQs

_________________________________________________________________________________

9. Monitor performance (Brand / Partnerize)

Both the brand and Partnerize must monitor to make sure sales are tracking as expected after 

_________________________________________________________________________________

Next Steps

  • Request a campaign_id from the Partnerize Integration team.  
  • Install the GTM templates using the instructions above.  Inform the Partnerize Integration team once this has been completed
  • Perform testing using the above instructions - Transactions will need to be submitted via the brand’s live website, so that the implementation can be fully tested.  

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request