Implementation

Pre-requisites

📋Before You Implement
  • Please ensure you have available all CJ specific IDs required to proceed with implementation. Specifically, you will need the Company ID, Tag ID, and Action Tracker ID.
  • Code examples are provided for reference only and may not be compatible with all shopping carts or platforms. CJ does not guarantee their accuracy for your specific setup.

Step 1 — Add the CJ Universal Tag in Tealium

CJ Affiliate hosts and manages a Universal Tag template in Tealium. Log into your Tealium account and complete the following steps to add CJ's tag template.

1
Click on the Tags tab.
2
Click +Add Tag.
3
Search for CJ Universal Tag and click +Add to add the template.
4
Enter your account-specific fields:
  • Title: CJ Affiliate Universal Tag (suggested)
  • Proxy Path: Enter your proxy path if using a reverse proxy (e.g. https://www.yourdomain.com/proxydirectory/tags/[tagId]/tag.js), or leave blank if not using a reverse proxy.
  • CJ Hosted Tag ID: Your Tag ID provided by CJ
  • Action Tracker ID: Your Action Tracker ID provided by CJ
  • CJ Enterprise ID: Your CJ Enterprise ID provided by CJ
  • Enable Page Visits: True
5
Under Publish Locations, select Publish to Dev and Publish to QA. Do not push to production without first testing in Dev and QA.
6
Set the Bundle Flag to No. Including the tag in the utag.js bundle can disrupt tracking solution functionality.
7
Open Advanced Settings and configure:
  • Tag Timing: DOM Ready
  • Send Flag: Leave as is
  • Synchronous Load Type: No (recommended)
8
Click Finish.
📘

Using a reverse proxy?

A reverse proxy routes CJ tag requests through your own domain, if your implementation requires one, see the full setup guide before continuing.


Step 2 — Map Variables to the CJ Template

With the CJ Universal Tag template added in Tealium, map your conversion properties to the tag's variables. Each data point sent to CJ must be mapped from data on your site (either a JS variable or UTAG data object) to a parameter in the CJ tag.

1
Click the Edit icon next to the Mapped Variables section header.
2
From the Variables drop-down, select +Add Variable.
3
If you do not already have a JavaScript or UTAG data object for the CJ tag property, create a new variable for the property and click Apply.
4
Map the JavaScript or UTAG variable to the CJ tag property:
  • Choose the variable from the drop-down
  • Click +Select Destination
  • Rotate through each Category
  • Select the CJ property under the Destination list
5
Click +Add Custom Destination.
6
Select Done.
7
After all variables have been mapped, select Apply.

Step 3 — Publish Your Tag

1
In the view of the CJ tag template, confirm all variables you mapped are shown. Click the Save/Publish icon.
2
On the pop-up screen, select Publish To options Dev and QA.
3
Select Publish.

Conversion Tag Properties

The table below covers the description, expected format, and requirement level for each CJ conversion tag property. Additional properties can be leveraged for deeper insights and situational commissioning on CJ's platform — refer to the Additional Template Parameters section below.

Click any row to see type, format, and value examples.
Parameter
Description
Required
actionTrackerId
A static value provided by CJ. Each action will have a unique actionTrackerId value.
Required
Type: Numeric
Examples
431952
Note: This value is provided by your CJ Client Integration team.
subTotal
Order subtotal. Do not include shipping or tax. CJ assumes the amount is in the currency specified in the currency parameter. If you specify a currency other than your functional currency, the system converts the amount using a current conversion rate.
Required
Type: Decimal
Examples
99.99
1409.00
Note: Recommended to return the subtotal pre-tax and pre-shipping.
cjeventOrder
Contains the click ID value stored in the cje cookie (see Server-Side Cookie step above). Required for CJ to attribute the conversion back to affiliate partners.
Required
currency
Identifies the currency used for the order amount. This three-letter ISO code can be hard-coded into the cj.order object. If no code is specified, prices display in your functional currency. If a blank value is submitted, a transaction error will occur.
Required
Type: ISO Currency Code
Examples
USD
EUR
GBP
Note: For a full list of supported currencies, visit the CJ Support Center.
discount
Whole order discount associated with the transaction, in the currency specified in the currency parameter.
Required
Type: Decimal
Examples
50
20.49
enterpriseId
Your CJ Enterprise ID. A static value provided by CJ.
Required
orderId
A unique identifier such as an order number or invoice number. Used to reconcile orders in your system with CJ to validate each sale or lead. Transactions are deduped based on the Order ID and Action Tracker ID values.
Required
Type: AlphanumericFormat: Max 96 chars — alphanumeric, dashes, underscores only
Examples
Order-145683
INV-2024-001
Note: Value will be truncated after the 96th character. CJ prohibits personally identifiable information such as full or partial email addresses in this field.
pageType
Should always be conversionConfirmation on transaction/conversion confirmation pages.
Required
Type: Alphanumeric
Allowed Values
conversionConfirmation
promoCode
The coupon or voucher code used in the transaction.
Recommended
Type: String
Examples
SAVE20
WELCOME10
Note: Pass an empty string if no coupon was applied. Omitting this field entirely may cause attribution issues for coupon-based publishers.
userId
Unique user ID you have assigned to the customer (e.g. membership ID, customer ID). Must not contain any Personally Identifiable Information.
Optional
emailHash
SHA-256 hash of the customer's email address. Remove leading/trailing spaces and convert the email address to lowercase before hashing.
Optional

Item-Level Details

Click any row to see type, format, and value examples.
Parameter
Description
Required
List of Product IDs
Identifier for each item purchased. A maximum of 100 sets of item-based values is supported per order. Alphanumeric with dashes or underscores only — spaces and other characters are not permitted. Item SKU values must be 100 characters or fewer.
Required
Type: AlphanumericFormat: Max 100 chars — alphanumeric, dashes, underscores only
Note: A maximum of 100 line items is supported per order.
List of Prices
Unit price for each individual item. Numeric only — no dollar signs or commas. Do not multiply by quantity (e.g. for two items at $3.00 each, send 3.00 not 6.00). Max 100 line items per order.
Required
Type: Decimal
Examples
13.49
3.00
Note: The system multiplies unitPrice by quantity to calculate the line total. Do not pre-multiply.
List of Quantities
Quantity for each item in the transaction. Multiplied by the unit price to determine the line total. Must be a whole number — the quantity field does not recognize decimal amounts (e.g. quantity=1.0 is read as quantity=10).
Required
Type: Integer
Note: Must be a whole number. Decimal values will be misread by the system.
List of Discounts
Discount for each line item. The discount is spread across all units: (unitPrice − (discount ÷ quantity)) × quantity. Example: unitPrice=10, quantity=2, discount=5 → per-item amount = 7.50, subtotal = 15.00.
Recommended
Type: Decimal
Note: The discount applies to the total line, not per unit.

Need help?

Submit a support ticket for account-specific support.

How to submit a ticket →