Tracking and pixels

You have several options for tracking and traffic analytics in AlterCPA: UTM tags, integrations with trackers, advertising network pixels, tracking codes for analytics systems, arbitrary code on websites. There is built-in integration with Facebook, Google Analytics or Google Tag Manager, Tik-Tok, MailTarget, VK, Likee, Yandex.Metrika.

Tags in the URL and API

You can use multiple tags to track your traffic and integrate with third-party services such as ad networks and trackers. Some of the tags can be used for statistics in the future, and some are simply recorded inside the lead and used for technical interaction. Tags can be specified in links and transmitted via the API when sending a lead.

UTM tags

Use standard UTM tags for analytics and accounting of your traffic. Using these tags, you can collect and group statistics, search for leads and clicks. We use five standard tags plus a domain, here is a list of them and content recommendations:

  • utm_source, utms, us - name of the traffic source.
  • utm_campaign, utmc, uc - name or identifier of the advertising campaign.
  • utm_content, utmn, un - name or identifier of the specific creative.
  • utm_term, utmt, ut - the keyword for which the ad is shown.
  • utm_medium, utmm, um - name or identifier of the ad group.
  • domain, host, utm_domain, utmd, ud - domain, where the event occurred (no need to indicate in the link).

It is recommended to use the first name from the list both in links and in the API. But we will accept and recognize any name. Custom tags with other names are not supported. The length of any tag must not exceed 255 characters.

Tags for agancies

When working as an agency, you have access to two additional tags for tracking, analytics and statistics grouping:

  • extu (external unique) - ID of a click or lead, a unique identifier on the side of your CRM or tracker.
  • exts (external source) - ID of the source or webmaster on your side.

The use of these options is not strictly required, but is highly recommended. They are displayed in the lead list and in the special "External Tags" statistics report. Unique ones are used to upload statistics and work with postbacks. Labels must not exceed 255 characters.

Tags for trackers

We offer three additional tags that you can use to integrate with your trackers. It is impossible to search for leads using them, they are not displayed in statistics reports, but they can be used for the technical side of integration - in API or postbacks.

  • subid or x32 - arbitrary subid label.
  • uuid, erid or x64 - arbitrary uuid label.
  • sub1, subid1, sid1 or xm1 - arbitrary sub1 label.
  • sub2, subid2, sid2 or xm2 - arbitrary sub2 label.
  • sub3, subid3, sid3 or xm3 - arbitrary sub3 label.
  • sub4, subid4, sid4 or xm4 - arbitrary sub4 label.
  • sub5, subid5, sid5 or xm5 - arbitrary sub5 label.
  • adid, fbclid, gclid, adclid, ttclid, unique_id, msclkid - ad network click identifier.

The postback uses macros of the same name in curly braces, for example {subid}, {uuid}, {fbclid} and so on. Read more in postbacks guide.

Very important! You won't be able to find a lead or click on these tags. You won't be able to group statistics by them. You won't be able to download costs from the ad network. No way. At all. They are needed only for S2S interaction with advertising networks and trackers. And for statistics, use UTM tags.

Advertising networks and analytics systems

Tracking codes and pixels are inserted into websites automatically. Pixels on all sites are dynamic: you don't have to specify the pixel ID in the flow settings, you can specify it in the GET parameter of the link to the site. They work in the same way both on sites in the repository and on sites downloaded from the flow. Depending on the network and offer, different pixels and counters may be available to you.

Some analytics systems don't send a conversion event on the Thank you page. For these counters, it is recommended to configure triggering by the presence of the text success in the link.

Facebook

On a landing or pre-landing page, the pixel sends a PageView event. After 30 seconds of the user's stay on the site, the ViewContent event is dispatched. On the Thank You page, the pixel dispatches the PageView and Lead events. Instead of the Lead event, you can specify your own character code.

To setup the pixel, the following parameters are used:

  • Facebook, parameter fb - Facebook pixel ID, numbers only. You can specify multiple identifiers separated by commas. Example: 12345678901234.
  • FB conversion event, parameter fbe - character code of the conversion event for the thank you page, which will be used instead of Lead. For example: InitiateCheckout or Purchase. Don't enter a pixel ID here!

Common error: in the "Conversion event" field, it is not the event ID that is specified, but the pixel ID. Do not enter the pixel ID in it. It's better not to fill it out at all. The name of the event does not affect the quality of optimization in any way.

Facebook Conversion API server pixel

The pixel fires once when a lead enters the system. Requires setting up the application and obtaining a token from Facebook.

To setup the pixel, the following parameters are used:

  • Facebook S2S pixel - pixel identifier, numbers only. Only one pixel can be set, for example: 12345678901234.
  • Facebook S2S event - character code of the event that will be sent with the pixel. If not specified, the Lead event is used.
  • Facebook S2S token - Facebook application token with access to sending pixels.
  • Proxy for S2S request - proxy for sending pixels is specified with protocol, IP address and port, for example: http://12.34.56.78:99
  • Proxy login and password - if the proxy requires authorization, specify the proxy login and password separated by a colon, for example: username:password

When working with the Conversion API, a regular Facebook token will not work. You need to generate a special API token in the pixel settings:

  • To obtain a token for the server pixel, you must go to Events Manager and click "Connect data source."
  • Then check the box for "Internet" and click the "Connect" button.
  • In the next step you need to enter the name of the new data source.
  • Next, add a link to the site or check the box for "I don’t have a website".
  • In the next step, we select independent configuration. Select the method of connecting to the site "Pixel Meta and Conversions API" and click "Next".
  • Then we select the Conversions API setting manually. On the page that opens, click "Continue".
  • Click "Continue", check that the settings are correct and, if everything is configured correctly, click "Confirm settings".
  • Then in the "Implement the API yourself" section, click on the "Implementation Guide" link.
  • And on the next page click the "Generate access token" button.

Sending events to Facebook ends up in the postback log. If you see an OAuthError error in the server response, it means you are using an incorrect token and you need to generate it according to the instructions above.

Google Analytics and Tag Manager

Tracking code from Google can be set in Google Analytics or Google Tag Manager format. If the ID starts with GTM, TagManager is used, otherwise Analytics is used.

To setup the pixel, the following parameters are used:

  • Google Analytics / Tag Manager, parameter ga - symbolic identifier of the tag in the form AW-XXXXXXX, GTM-XXXXXXX and the like.
  • Google Analytics Conversion Event, parameter gad is a strange character set from analytics settings.

In the analytics event settings, you will come across a code like AW-XXXXX/abcdef12345. The abcdef12345 piece is the event you need, specify it in the settings.

VK

The VK audience collection pixel is located on all pages of the site. Thank you page fires lead event.

To configure, use the VK retarget field or the vk parameter. It specifies the pixel ID, for example: VK-RTGT-XXXX-XXXX.

Yandex.Metrika

The Yandex.Metrika counter is installed on all pages of the site. No events are sent automatically, use URL settings.

Use the Yandex.Metrika field or the mtrk parameter to configure. It specifies the counter ID, for example: 1234567890.

Mail Target

The Mail Target counter dispatches the PageView event on all pages. On the "Thank you" page, the ItemView event with the purchase type is additionally fired.

Use the Mail Target field or the mt parameter to configure. It specifies the counter ID, for example: 1234567890.

Tik-Tok

The Tik-Tok pixel is installed on all pages of the site. No events are sent automatically, use URL settings.

Use the Tik-Tok field or the tt parameter to configure. It specifies the counter ID, for example: 1234567890.

Likee

The pixel sends a page_view event on all pages. The Thank you page additionally sends a form event.

Use the Likee field or the lki parameter to configure. It specifies the counter ID, for example: 1234567890.

Pixels in the URL

To pass counters and pixels in a link, use the parameters:

  • fb - Facebook pixel ID, multiple separated by commas.
  • fbe - Facebook conversion event code, if you need something instead of Lead.
  • ga - Google Analytics or Tag Manager counter ID.
  • gad - symbolic identifier of the Google Analytics conversion event.
  • vk - VK retagret pixel ID.
  • mtrk - Yandex.Metrika counter ID.
  • mt - ID of the Mail Target counter.
  • tt - Tik-Tok pixel ID.
  • lki - Likee pixel ID.

Arbitrary code on sites

Some offers allow you to install arbitrary code on websites that you can use for custom tracking systems. The code for the site header is indicated at the end of the head tag, the code for the footer is indicated at the end of the body. The same code is installed on all pages of the site, including the "Thank you" page.

You can use macros that match the parameters from the request: {utm_source}, {utm_campaign}, {utm_content}, {utm_term}, {utm_medium}, {subid}, {uuid}, {uid}, {fb}, {fbe}, {ga}, {gad}, {mt}, {mtrk}, {tt}, {lki}.

To add JavaScript code that will only fire on the thank you page, use the following approach:

<script type="text/javascript">
  if (window.location.href.includes("success")) {
    // Ваш код конверсии
  }
</script>

You can also use blocks that will only appear on the thanks page or on the main site. The contents of the <!--site-->XXX<!--/site--> block will be shown only on the main pages, and <!--thanks--&gt ;XXX<!--/thanks--> only on the thanks page. For example:

<!--site-->This is shown only on the site!<!--/site-->
<!--thanks-->This is only shown on thanks!<!--/thanks-->
And this is shown on all pages.

Arbitrary code in iframe

Some external offers support setting their own iframes, in which you can specify any arbitrary code. Depending on the offer, there may be a single iframe for all pages or a different code for the site and the "Thank you" page.

You can use macros that match the parameters from the request: {utm_source}, {utm_campaign}, {utm_content}, {utm_term}, {utm_medium}, {subid}, {uuid}, {uid}, {fb}, {fbe}, {ga}, {gad}, {mt}, {mtrk}, {tt}, {lki}.