Installation

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 your Technical Integration Plan document and find the Universal Tracking Tag section.

  2. Copy the entire code snippet from from your technical integration plan. It should look similar to below:

<script>
  (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 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 identify and trackConversion functions 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.

2

Install the identify function

The identify function is used to identify users as accurately as possible across your site, particularly across devices. The function supplies 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>
  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, 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.

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>
  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 order confirmation page.

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.

Parameter
Description
Data Type

orderId

Unique order identifier your platform assigns to orders.

ALPHANUMERIC(64)

customProfileId

Unique identifier used to identify a visitor on your website.

STRING(70)

customerId

Unique 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)

customerEmail

SHA-1 hash of the customer's email address. Pass an empty string if unavailable.

STRING(255)

customerStatus

Submit values of either New or Existing. Can be configured to alter payouts.

ALPHANUMERIC(40)

currencyCode

Three-letter ISO 4217 code for the currency of your platform.

STRING(3)

orderPromoCode

Promotional (or coupon) code applied to the order. Pass an empty string if unavailable.

STRING(64)

orderDiscount

Total 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)

subTotal

SKU set subtotal of the line item (pre-tax, pre-shipping, pre-discount).

DECIMAL(8,2)

category

Item category identifier. Can be configured to alter payouts.

STRING(64)

sku

Item stock-keeping unit (SKU) identifier.

ALPHANUMERIC(40)

quantity

Item quantity.

INTEGER

name

Item name.

STRING(128)

trackConversion example payload

See the example payload of a tracked conversion:

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 the impact.com app is fully installed, you can begin end-to-end testing to ensure everything is working properly. Learn how to proceed with End-to-End Testing.

Last updated