Impact tag for Google Tag Manager Server Side

Configuration

Event types

  • On a Page View event the Impact tag stores the im_ref URL parameter inside the impact_cid cookie.

  • On a Conversion event the Impact tag sends a postback with conversion data to Impact.

    • Impact Account SID - Impact Account SID
    • Auth Token - view and manage API keys in the impact.com Platform
    • Event Type ID - unique identifier for the event type (or action tracker) that tracked this conversion.
    • Campaign/Program ID - unique identifier for the campaign (or program) that the conversion is associated with.
    • Order ID (Required) - unique identifier for the order associated with this conversion. For example, in a retail sale, this could be the Order ID you’ve assigned the customer for their purchase. Note that an OrderId value only needs to be unique to the event type (also known as the action tracker).
    • Array of products - product data in GA4 items or UA products format
    • Send User IP address - user IP address
    • Attribution Keys - at least one attribution key is required. When Automap Attribution Keys is enabled (default), the tag reads the impact_cid cookie as the Click ID automatically. Any value entered manually always overrides the auto-mapped one. Supported keys: Click ID, Customer Email, Customer ID, Custom Profile ID, Order Promo Code, Unique URL, Google Advertising ID, Apple IDFA, Apple IDFV, Media ID, Phone Number, Caller ID.
    • Additional Parameters - key/value table for sending any extra parameters supported by the Impact Conversions API.

How to use

Open Source

The Impact Tag for GTM Server Side is developed and maintained by the Stape Team under the Apache 2.0 license.

GTM Gallery Status

:green_circle: Listed

GitHub

:green_circle: Repository

stape-io/impact-tag — updated: view commit

  • Added an early return guard clause to skip sending requests for page views from internal GTM domains, improving performance and avoiding redundant API calls.
  • Refactored the HTTP request logic to use a standardized options object with method, headers, and JSON stringified body, adapting to a Promise-based sendHttpRequest for better async handling.
  • Enhanced error handling by adding catch blocks that log failure reasons and trigger appropriate failure callbacks, increasing robustness and diagnosability on API call errors.
  • Improved payload validation to ensure product arrays have items before processing, preventing unnecessary requests with empty data.
  • Expanded and updated unit test scenarios extensively to cover successful conversions, early return conditions, API rejections, timestamp overrides, and cookie-setting on page views, greatly improving test coverage and reliability.
  • Minor code cleanup and consistency improvements including variable declarations and usage aligned with best practices.

GTM Gallery Status

:green_circle: Listed

1 Like