Skip to content

Google Analytics Campaigns Tracking

Use the sc-ref-id and sc-cmp-id parameters from your referral URL to understand the source and impact of affiliate-driven traffic.

https://www.cryptowaves.app/landing?sc-ref-id=XXX&sc-cmp-id=YYY

Here’s how you can leverage these parameters in Google Analytics tracking:

Using Custom Dimensions in Google Analytics

  • Custom Dimensions allow you to store additional information about each session, such as affiliate IDs and campaign IDs. By capturing sc-ref-id and sc-cmp-id, you’ll be able to view affiliate performance and campaign impact directly in your reports.

  • Steps:

    1. Create Custom Dimensions in your Google Analytics account for sc-ref-id (affiliate) and sc-cmp-id (campaign).

    2. Configure your tracking code to capture these parameters:

      // Example for Google Analytics 4
      const urlParams = new URLSearchParams(window.location.search);
      const scRefId = urlParams.get('sc-ref-id');
      const scCmpId = urlParams.get('sc-cmp-id');
      if (scRefId) {
      gtag('event', 'affiliate_traffic', {
      sc_ref_id: scRefId,
      sc_cmp_id: scCmpId
      });
      }
    3. In Google Analytics, these events will show up with the specified sc_ref_id and sc_cmp_id values. You can use these to filter traffic, conversions, and revenue by affiliate and campaign.

Tracking Campaigns in Google Analytics Using UTM Parameters

  • You can append UTM parameters alongside sc-ref-id and sc-cmp-id to further integrate with Google Analytics’ built-in campaign tracking.

  • Example URL:

    https://www.cryptowaves.app/landing?sc-ref-id=XXX&sc-cmp-id=YYY&utm_source=affiliate&utm_medium=referral&utm_campaign=SoyCap_Campaign
  • Result:

    • utm_source tracks the general source (e.g., “affiliate”).
    • utm_medium tracks the traffic type (e.g., “referral”).
    • utm_campaign can be set to a specific campaign name or identifier for better filtering.

Enhanced eCommerce Tracking

  • If you are using eCommerce tracking, you can log transactions as conversions with the affiliate’s sc-ref-id and sc-cmp-id stored as custom variables or attributes on each sale or lead submission.
  • This will allow you to see revenue generated by each affiliate and campaign over time.

Using Google Tag Manager for Flexibility

  • Set up Google Tag Manager (GTM) to dynamically capture URL parameters. GTM can make it easier to handle these parameters across multiple pages without changing your site’s code.

  • Steps:

    1. Create a URL Variable in GTM to capture sc-ref-id and sc-cmp-id.
    2. Use GTM Triggers to send this data to Google Analytics as custom events or dimensions whenever the URL contains these parameters.

Applying Insights

  • Conversion Rate Optimization: Track which affiliates drive the most traffic and conversions by filtering Google Analytics reports based on sc-ref-id.
  • Campaign Performance: Measure each campaign’s effectiveness by tracking metrics like traffic, conversion rates, and revenue associated with each sc-cmp-id.
  • Affiliate Payouts: Use Google Analytics data to validate conversions attributed to each affiliate (sc-ref-id), simplifying payout calculations.

By using these methods, you can effectively track affiliate-driven traffic and measure the success of each campaign on Google Analytics or other traffic monitoring tools.