Stape
Search
Try for free

CJ server-to-server tracking using server Google Tag Manager

Updated
Sep 10, 2024
Published
Feb 16, 2024

CJ specializes in performance-based marketing through an affiliate network. Their platform facilitates scalable and sustainable growth for brands, publishers, and creators within a partnership-based marketing ecosystem. It offers solutions like CJ Affiliate, CJ Influence, and CJ Leads to help businesses connect with their target audience and drive growth. The platform is powered by data, technology, and industry expertise, designed to help users grow at every stage of their affiliate marketing journey. 

That’s why we decided to create a CJ tag for server Google Tag Manager. With it, the integration is as smooth as possible. In this article we’ll describe CJ server-side tracking and how you can set it up using the server GTM container.

What are the benefits of CJ tag and how it works

CJ's server-side tracking works by sending data from a server to CJ's servers, rather than relying on browser-based tracking. This method is more reliable and secure, as it minimizes data loss due to browser restrictions like ad blockers or cookie limitations

Moreover, the server-side approach allows for more customization and control over the data sent to CJ. It involves integrating CJ's tracking system into your server's backend. When a user performs a trackable action on your site, your server records this event and sends the relevant data directly to CJ. 

You can read more about GDPR, server-side cookies and CJ Enhanced Tracking Integration in the official documentation

How to set up CJ tag for server Google Tag Manager

1. Download the CJ tag from GitHub or add it from Template Gallery.  

2. Open your GTM server container. On the left menu choose “Templates”. In the “Tag templates” section, click on “New”. Click three dots in the top right corner, and click import. Choose the file you recently downloaded.

cj tag for server google tag manager by stape

3. There are two types of events that CJ tag includes: PageView and Conversion.

  • Pageview event stores the CJEVENT URL parameter inside the cje cookie.
  • Conversion event sends a request with the specified conversion event data to CJ postback URL.

4. When setting up a conversion event, you must add a list of parameters.

  • CID - CJ assigned ID for your program
  • Type - Also referred to as Action ID, this is a CJ assigned value that identifies the action being tracked

Also, you can override values of the following parameters which will be parsed from eventData by default:

  • Conversion Date Time
  • Order ID
  • Currency Code
  • Coupon
  • Discount
  • Items

Cj tag allows:

  1. Reading data from the event. 
  2. Sending an HTTP request to a specified URL.
  3. Setting a cookie with the specified name and parameters.
  4. Reading the request headers, query parameters, body, path, or remote IP address.
  5. Reading the values of the cookies with the specified name.
  6. Logs to the developer console and Tag Manager's preview mode.
  7. Reading data about the container.

5. Once you’ve done setting up and testing, do not forget to publish server container changes.

Conclusion:

CJ server-to-server tracking is one of the best solutions for affiliate marketing. Not only is it highly reliable and secure, but it also offers real-time data analytics, enabling marketers to make informed decisions quickly. This system ensures accurate tracking of conversions and transactions, even in complex multi-device environments, thereby enhancing the precision of performance metrics.

We hope this article has helped you to get a perfect CJ server-to-server integration using server GTM. If you need assistance setting-up CJ tag or with any other affiliate network, please contact us, and we would be happy to help. Thanks for reading!

Tagged with:gtm serversGTM tag

Try Stape for all things server-sideright now!