Installation

❗️

Note

This integration requires a skilled web developer comfortable with JavaScript, HTML, tag managers, and browser developer tools to configure, implement, and test.

Step 1: Install the Universal Tracking Tag (UTT)


Your impact.com account has a unique Universal Tracking Tag specific to your account, which needs to be placed within the global <head> tag of your site.

☑️

Get & Install the UTT

  1. Access to your Technical Integration Plan document and find the Universal Tracking Tag section.

  2. Copy the entire code snippet from this document — it should look similar to below:

  <script type="text/javascript">
  (function(a,b,c,d,e,f,g){e['ire_o']=c;e[c]=e[c]||function(){(e[c].a=e[c].a||[]).
  push(arguments)};f=d.createElement(b);g=d.getElementsByTagName(b)[0];f.async=1;f
  .src=a;g.parentNode.insertBefore(f,g);})('https://utt.impactcdn.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX.js',
  'script','ire',document,window); 
 </script>
  1. Place this snippet within the global <head> </head> HTML element of your site, or in a tag manager, add the UTT as a custom HTML tag.

📘

Why does the UTT need to be first?

The UTT is required for the other two functions — identify and trackConversion — to work. If the UTT doesn't load before these, the integration can break. Make sure the UTT loads globally across your site before these two functions load.

Step 2: Install the identify function


The identify function is used to identify users as accurately across your site, particularly across devices. You'll supply identifiers so impact.com can map them to conversion events for attribution.

☑️

Get & Install identify

  1. Access your Technical Integration Plan document and find the Identify Function section.

  2. Copy the entire code snippet from this document, then modify the snippet's values with dynamic variables:

<script type="text/javascript">
	ire('identify', {customerId: 'Customer Id', 
	customerEmail: 'SHA1 Email Address', customProfileId: 'UUID'});
</script>
  • customProfileId: A unique identifier used to identify a visitor on your website (regardless of whether they're signed in). Common examples include UUIDs, anonymous user cookies, and IDFVs.
  • customerId: a visitor's unique identifier that maps to your site's backend systems.
  • customerEmail: A SHA-1 hash of a visitor's email address.

If any of these values are unknown, pass an empty string.

  1. Add your modified code snippet at the top of the <body> HTML element of each page on your website, or use a tag manager to add this code snippet to the top of each <body> HTML element across your site.

📘

Info

When you pass the SHA-1 hash of the visitor’s email address, impact.com uses an additional HMAC-SHA-256 hash on the passed value for additional security.

Generate a customProfileId

The CustomProfileId parameter enhances the UTT's identify, trackConversion, and trackCart functions by including an anonymous, first-party identifier from the advertiser. To generate an effective CustomProfileId, ideally a UUID, please adhere to the following recommendations:

  • Non-Personal Data: The identifier should not contain any data that could directly identify an individual, such as email addresses or authenticated user IDs. Instead, use the respective CustomerEmail (SHA1 hashed) and CustomerId fields.
  • Secure Storage Practices: Store the identifier in a cookie with HTTPOnly and Same-Site attributes to prevent unauthorized access and enhance security against web-based attacks.
  • Alignment with Site’s IP Range: Ensure the domain issuing the cookie matches the site’s IP address range, maintaining the identifier's status as a first-party element in browsers like Safari and supporting effective tracking.

Step 3: Install the trackConversion function


The trackConversion function is used on your site’s order confirmation page to track the conversion data of an online sale and report it to impact.com.

☑️

Get & Install trackConversion

  1. Access your Technical Integration Plan document and find the Conversion Tracking Tags section.

  2. Copy the entire code snippet from this document.

  3. Modify the snippet's values with dynamic variables (all variables are required):

<script type="text/javascript">
ire('trackConversion', 41642, {
     orderId: "Order Id here",
     customProfileId: "UUID here",
     customerId: "Customer Id here",
     customerEmail: "SHA1 Hash of Customer’s Email",
     customerStatus: "Customer Status here",
     currencyCode: "USD",
     orderPromoCode: "Promo Code here",
     orderDiscount: 15.00,
     items: [
               {
		   subTotal: 28.00,
		   category: "Product Category 1",
		   sku: "sku-11111",
		   quantity: 2,
               name: "Product Name 1"
               },
               {
		   subTotal: 99.00,
		   category: "Product Category 2",
		   sku: "sku-22222",
		   quantity: 3,
               name: "Product Name 2"
	         }
            ]
          },
          {
          verifySiteDefinitionMatch:true
          }
          );
</script>
  1. Add your modified code snippet at the top of the HTML element of the order confirmation page of your site, or use a tag manager to add this code snippet to the top of each HTML element across your site.

trackConversion parameter definitions

The table below lists a range of supported parameters that the trackConversion function supports. Parameters should be passed a value from your site using dynamic variables when a conversion occurs.

⚠️

Note

Your Technical Integration Plan specifies which variables you need to pass — refer to that document for details. Do not pass additional variables without first consulting the impact.com Technical Services team.

ParameterDescriptionData Type
orderIdUnique order identifier your platform assigns to orders.ALPHANUMERIC(64)
customProfileIdUnique identifier used to identify a visitor on your website.STRING(70)
customerIdUnique customer identifier your platform assigns to customer accounts. Do not use personally identifiable data for this field. Pass an empty string if unavailable.STRING(255)
customerEmailSHA-1 hash of the customer's email address. Pass an empty string if unavailable.STRING(255)
customerStatusSubmit values of either New or Existing. Can be configured to alter payouts.ALPHANUMERIC(40)
currencyCodeThree-letter ISO 4217 code for the currency of your platform.STRING(3)
orderPromoCodePromotional (or coupon) code applied to the order. Pass an empty string if unavailable.STRING(64)
orderDiscountTotal discount amount on the order. This will be subtracted proportionally from the item-level subtotals when revenue values are calculated by impact.com.DECIMAL(8,2)
subTotalSKU set subtotal of the line item (pre-tax, pre-shipping, pre-discount).DECIMAL(8,2)
categoryItem category identifier. Can be configured to alter payouts.STRING(64)
skuItem stock-keeping unit (SKU) identifier.ALPHANUMERIC(40)
quantityItem quantity.INTEGER
nameItem name.STRING(128)

trackConversion example payload

See the example payload of a tracked conversion:

<script type="text/javascript">
  ire('trackConversion', ${eventId}, {
    orderId: 1234567,
    customProfileId: "Custom Profile ID here",
    customerId: "Customer Id here",
    customerEmail: 'SHA1 Hash of Customer’s Email',
    customerStatus: “New”,
    currencyCode: "USD",
    orderPromoCode: "ACME",
    orderDiscount: 15.00,
    items: [
      {
        subTotal: 28.00,
        category: "Product Category 1",
        sku: "sku-11111",
        quantity: 2,
        name: "Football",
      },
      {
        subTotal: 99.00,
        category: "Product Category 2",
        sku: "sku-11112",
        quantity: 3,
        name: "Men’s Jersey",
      }
    ]
  },
  {
    verifySiteDefinitionMatch:true
  }
  );
</script>

Notes

  • There are two (2) Footballs being purchased at a unit price of 14.00 which is a SKU set subtotal of 28.00.

  • There are also three (3) Men’s Jerseys being purchased at a unit price of 33.00 each for a SKU set subtotal of 99.00.

  • impact.com will take the 15.00 discount passed and apply that proportionately to all items in the purchase.

End-to-End Testing

Once your integration is complete, you can begin end-to-end testing to ensure everything is working properly. Learn how to proceed with End-to-End Testing.


What’s Next

Verify the UTT and functions are loading, then complete an end-to-end conversion test.