What are tracking snippets?

Tracking snippets let you add small pieces of JavaScript that load right after your pixel but before any destinations. This is useful when you want to run code before events are tracked in Converge or sent to your destinations. Common uses include:

  • Setting an event property that should be sent with every event.
  • Tracking a custom event in Converge that requires JavaScript.
  • Adding a default Google or Microsoft Consent Mode status.
Tracking snippets can only be added to a client-side pixel.

How to add a tracking snippet

  1. Go to Event sources under Data management in the main navigation.
  2. Select a Client-Side Pixel that’s loaded on your website where you want to add the snippet.
  3. Open the Custom tracking tab.
  4. In the Tracking snippets section, click Add snippet.
  5. Add the JavaScript code you want to include.
  6. Click Save.
You can only add JavaScript code directly. You can’t load a JavaScript file through a <script> tag.