Google Analytics: Integration of your sales data

Table of contents

    How to track affiliate sales in Google Analytics?

    This integration with Google Analytics will allow you to send to your Google Analytics account the sales that are generated by users and thus see your performance of channels, traffic sources, landing pages and content.


    Our solution does not require you to cloak your URLs or connect to an external API to modify your links, which does not slow down the loading of your pages for your visitors. We use subids/customs to send the anonymous Client ID to the transaction, then Strackr retrieves the transactions with this Client ID to send to your Google Analytics account.

    In this documentation we will show you how to add the integration as quickly as possible, with 2 steps:

    1. Enabling Ecommerce feature in Google Analytics
    2. Install our JavaScript snippet (around 3ko gzipped) or you can do it manually.

    The integration is compatible with Universal Analytics (UA) and Google Analytics 4 (GA4) in Alpha.

    Enabling Ecommerce in Google Analytics

    For Universal Analytics (UA)

    1. Log in to your Google Analytics account with administrator rights, go to Admin, select your website, View, Ecommerce Settings:

    Turn on “Enable Ecommerce” and Save:

    2. To improve the accuracy of sales attributions you need to increase the session duration to 4 hours maximum. It is necessary to increase it because there may be some time between the notification of the transaction to the network and the sending of the transaction by Strackr to Google Analytics.

    Go to Admin – Tracking Info – Session Settings:

    Set Session timeout to 4 hours and 0 minutes (the maximum)

    Your Google Analytics account is now ready to receive data.

    For Google Analytics 4 (GA4)

    To improve the accuracy of sales attributions you need to increase the session duration to the maximum, 7 hours.

    Got to Admin – Property – Data Streams, then select your Data Stream. On this page, click on More Tagging Settings:

    Then Adjust session timeout:

    Select the maximum value (7 hours and 55 minutes) and don't forget to click on Save on the top right of your screen:


    Your Google Analytics 4 account is now ready.

    Strackr integration

    1. Depending on the version you are using, you will need your Tracking ID for Universal Analytics or your Measurement ID for Google Analytics 4.

    Universal Analytics: On Google Analytics, go to the Admin page, in the Property column, click Property Settings find your tracking ID, it begins with "UA-" for example: UA-111111-11.

    Google Analytics 4, go the Admin page,in the Property column, click Data Streams, then click on your web data stream. Your “G-” Measurement ID appears in the upper right portion of the panel, for example G-1111111111.

    You can check the Google documentation if you need more information.

    Now on Strackr, in the Integrations section, Google Analytics go to the GA Accounts page and add a new Google Analytics account with the tracking ID or measurement ID found on Google Analytics:

    Optionally, you can add a URL that will be used to specify the HostName in your Google Anaytics reports.

    You will get your Strackr Tracking ID (STID), it’s an ID with 5 characters, example: gSfhP.

    2. On the same page, click on the JavaScript snippet icon on the right to display the Javascript snippet to past after the Google Analytics tag on each page that you want to track sales:


    And that's it! Strackr will take care of sending the transactions to Google Analytics and you will be able to track the performance of landing pages, channels, source, medium, campaigns, devices, demographics and locations.

    More informations

    • If you use subids/custom in your URLs, our script will use an empty parameter in the URLs without replace your own subids.
    • If Google Analytics is blocked with an Adblocker, you will either not see the transaction in Google Analytics or only the transaction without the navigation on your site.
    • Safari can block third party Javascript to access to the Google Analytics Javascript API, it is recommended to proxy our script, find more information on this page.

    Get started for free

    30 days free trial, no credit card required. Connect to your networks within minutes — and cancel anytime.

    Try for free

    Try the live demo

    Not quite ready to sign up? Take a test drive of the Strackr dashboard in our interactive live demo.

    See the live demo

    Still have questions?

    If there’s anything else you want to know about Strackr, contact us and we’ll be happy to fill you in.

    Contact us