Git Product home page Git Product logo

cj-affiliate-tag's Introduction

CJ Affiliate Tag for Google Tag Manager(server-side)

The CJ Affiliate Tag allows advertisers to store a server-side cookie for CJ's click ID and send a conversion event (S2S) to CJ Affiliate.

CJ Affiliate Tag tracks two event types:

  • Pageview event reads the CJ's click ID parameter from the URL (cjevent) and stores it on a server-side cookie named cje.
  • Conversion event sends the conversion to CJ Affiliate.

This template is a tag that reads the standard event schema that’s sent from the client running on a tagging server. It then converts the conversion event to the appropriate schema and sends it through CJ API. The Tag supports only the GA4 Client

How to use the CJ Affiliate tag

Please follow the instructions here.

Reporting Bugs/Feedback

Please raise any issue on GitHub.

Open Source

CJ Affiliate Tag for GTM Server Side is developed and maintained by Addingwell under the Apache 2.0 license.

cj-affiliate-tag's People

Contributors

simcamadd avatar jhuret avatar wfrancois avatar sthijs avatar

Stargazers

M. B. SELVI avatar Drazen Karacic avatar  avatar

Watchers

Drazen Karacic avatar  avatar  avatar

Forkers

sthijs reinylegit

cj-affiliate-tag's Issues

Incorrect DCNTx parameter

We had an issue where the CJ Affiliate tag produces an incorrect result for CJ.

We are using the CJ Affiliate tag in a GTM server-side container, and have the GA4 client as trigger (according to the documentation). We are using a GA4 ecommerce (EEC) standard compliant datalayer on our website.

I was in contact with CJ's associate integration engineer because the calculated order total at CJ's end did not match the actual order value. He told us that the DCNTx parameter should be the item-level discount multiplied by the item-level quantity.
He showed us the full calculation that CJ uses to produce the total order amount:
(((AMT1 * QTY1) – DCNT1) + ((AMT2 * QTY2) – DCNT2) + … + ((AMTx * QTYx) – DCNTx) – DISCOUNT)
Here you can see that they multiply the item-level amount by quantity, but they do not do that for discount.

This produces an incorrect result in the following example - if you are using GA4 ecommerce standard:
Let's say you buy a product twice with a discount:

Product 1: AMT1 = 149, QTY1 = 2, DCNT1 = 22.35

(Order level discount does not apply).

The total order amount in this order would be 253.30

However, according to how CJ calculates the total order amount, they have a different result:
( (AMT1=149 * QTY1=2) – DCNT1=22.35 ) – DISCOUNT=0 )
which gives a total of 275,65.

As this is the way they calculate their order amount, he requested us the change the DCNTx parameter and multiply it by QTYx before sending to CJ.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.