Skip to main content
Skip table of contents

How to Track Google Ads Campaigns

You can use Katalys Conversion Reports to report on affiliate revenue and upload this data to Google Ads.

Instructions

Follow these instructions:

  1. capture the GCLID (Google Click ID) parameter value from your landing pages URL into your outbound Katalys affiliate links;

  2. on a cadence, generate a Katalys Conversion report;

  3. upload that report into Google Ads.

To retrieve the GCLID parameter on your landing page, you must activate “Auto-Tagging” within Google Ads. This is turned on by default for most accounts. Read more →

Separately, you must add JavaScript code into the landing page for your campaign. The code must copy the gclid parameter out of the URL and into all the affiliate links on your page. You can choose any Katalys tracking link sub-value (see all available parameters). We will use the parameter sub2 for this guide; this value will be visible in Katalys Reporting as “Partner Sub 2”.

Example JavaScript code that clones

This JavaScript code will copy the URL parameter named gclid= into the outbound Katalys affiliate links using the sub2 parameter.

HTML
<script>
// clone URL parameters into Katalys tracking links
(function() {
    const parameterMap = {
        'gclid': 'sub2',
        'utm_source': 'sub3',
        'utm_campaign': 'sub4',
    };
    const s = new URLSearchParams(location.search);
    let p = '';
    for (const k in parameterMap) {
        const v = s.get(k);
        if (v) {
            p += '&' + parameterMap[k] + '=' + encodeURIComponent(v);
        }
    }
    if (p) {
        document.querySelectorAll('a').forEach(a => {
            if (String(a.href).includes('://track.revoffers.com')) {
                a.href += p;
                console.debug("Updating tracking link", a)
            }
        });
    }
})()
</script>

Once auto-tagging is activated, and your parameter-cloning script is deployed, you will be capturing GCLID values into your affiliate links.

Download Katalys Conversion Report

After your campaign is live, you should download a Katalys Conversion Report to retrieve the GCLID values. On a daily or weekly cadence, use these steps to download your report.

  1. Open up your Katalys Marketing Platform account and navigate to “Reports → Conversions”
    Open up the Conversion Report page →

  2. Select the appropriate time frame.

  3. Click “Columns” and make your selection

    1. Partner Sub 2 (or whatever parameter you selected above to hold your GCLID)

    2. Order Time

    3. Commission

  4. Click “Export” and download the result as a CSV.

Upload data to Google Ads

To upload the data into Google Ads, you need to provide a properly-formatted CSV or Google Sheet. Create your CSV or Google Sheet, and append your downloaded Katalys Data.

  • Partner Sub 2 (or whatever parameter you selected to hold your GCLID) will map to the column “Google Click ID”

  • Order Time will map to “Conversion Time”

  • Commission will map to “Conversion Value”

An example Google Ads format is below. You can use this table as an example to get started.

Read the Google Ads documentation for more information →

Parameters:TimeZone=-0800

# Google Ads docs: https://support.google.com/google-ads/answer/7014069?hl=en#view_files&zippy=%2Cone-time-upload-of-your-conversions%2Cview-your-uploaded-files%2Cfix-import-issues%2Cexternally-attributed-conversions

Google Click ID

Conversion Time

Conversion Value

Conversion Currency

Conversion Name

(VALUE FROM REPORT)

(VALUE FROM REPORT)

(VALUE FROM REPORT)

USD

(YOUR Google Ads EVENT NAME)

More Reading

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.