Install Pixel Manually

Step-by-step guide on how to implement the web engagement pixel to your website’s code if you’re not using a tag manager or integration.

About Manual Installation

This method hardcodes the pixel directly in the website. However, it may get confusing to manage if you have many pages on your website or if you have many tags added to your coding. If this is the case, we recommend that you install pixels through Google Tag Manager or Shopify, if possible. The manual installation method should only be used if you do not use Google Tag Manager or do not have a Shopify store.


Obtain Your Unique Identifier

With GroundTruth Pixel, a unique identifier (GTID) is required not only to link activity to your specific account, but also to correctly attribute conversions across different channels.

  1. Request: Contact your GroundTruth representative to request your GTID.
  2. One ID: You only need one (1) GTID per account. Whether you’re running CTV, Audio, Display, or otherwise, all websites (if different) and campaigns will use the same identifier for efficient and comprehensive tracking.

Install the Base Pixel Code

The GroundTruth Pixel’s base code automatically supports omnichannel tracking. By assigning a unique identifier to your website, the pixel enables view-through attribution, allowing the platform to link web actions back to non-clickable (CTV and Audio). This is in addition to click-through attribution measured for standard mobile and desktop display. Place the following code in the header (<head>) of every page on your website

  1. Copy the code snippet below
<!-- Start GroundTruth Analytics -->
<script>
  window.GTPX_DEBUG = false;  // Set to true to enable console debugging
  (function(g, r, o, u, n, d, t) {
    g[n] = g[n] || function() {
      (g[n].q = g[n].q || []).push(arguments);
    };
    g[n].l = 1 * new Date();
    t = r.createElement(o); t.async = 1; t.src = u;
    r.getElementsByTagName('head')[0].appendChild(t);
  })(window, document, 'script', 'https://analytics.groundtruth-data.com/pixel.v2.js', 'gtpx');
  // Initialize with your unique identifier
  gtpx('init', {
    gtid: 'XXXXX' 
  });
  // Explicitly track pageview (Recommended for standard sites and SPAs)
  gtpx('pageview');
</script>
<!-- End GroundTruth Analytics -->
  1. IMPORTANT ACTION: Replace XXXXX with the unique GTID provided by your representative.
  2. Comment Tags: Keep the comment tags to easily identify the code within your site's HTML
    • Start Tag: <!-- GroundTruth Engagement Pixel -->
    • End Tag: <!-- End GroundTruth Engagement Pixel --> 
  3. Validation: Follow these steps to [Validate Pixel Installation]

Connect with your GroundTruth representative or selfservehelp@groundtruth.com to obtain your GTID

Setting Up Custom Events

Optional: To track specific actions like purchases or sign-ups, your developer must add a “signal” line of code to the specific action pages (e.g., the “Thank You” or confirmation page).

Cart

Triggered when a product is added to cart (e.g., gtpx('cart',{amount:49.99});). Remember to replace XXXXX with a numerical value.

gtpx('cart',{amount: XXXXX});

Purchase 

Triggered when a purchase is completed, like on a "thank you" page (e.g., gtpx(‘purchase’,{amount:139.00});). Remember to replace XXXXX with a numerical value.

gtpx('purchase',{amount: XXXXX});

Signup

Triggered when a signup is completed, like when a form fill is completed. Advertiser must decide when a single conversion should be fired.

gtpx('signup';);

 


Understanding Attribution

GroundTruth uses a Last-Touch Attribution model. This means the credit for a website visit or conversion is given to the most recent ad the user saw or clicked before visiting your website.

This works identically to our foot traffic attribution: if a user sees a CTV ad and then a Mobile ad before visiting your site, the Mobile ad receives the credit as the final touchpoint.


Frequently Asked Questions

  1. How do I generate the pixel? The base pixel can be found above, which you can copy but remember that you need a unique identifier (GTID) to replace the XXXXX before implementing it onto your website. Reach out to a representative to receive your GTID. 
  2. Do I need to generate a new pixel for every campaign? Your GTID is mapped to your Account ID. One pixel can have multiple website domains. 
  3. Where does the pixel need to be placed? On every page of the website to ensure it captures a comprehensive view of the user journey.
  4. Where do I place custom event code? Place custom code only on the specific page that confirms the action (e.g., the post-submission confirmation page). Do not place custom event code in the global header.
  5. What if my site uses a 3rd-party checkout platform? If your site redirects to a different domain, the tracking data may be lost during the redirect. We suggest directing your ad traffic directly to the final conversion domain to ensure accurate reporting.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.