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
andsc-cmp-id
, you’ll be able to view affiliate performance and campaign impact directly in your reports. -
Steps:
-
Create Custom Dimensions in your Google Analytics account for
sc-ref-id
(affiliate) andsc-cmp-id
(campaign). -
Configure your tracking code to capture these parameters:
// Example for Google Analytics 4const 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});} -
In Google Analytics, these events will show up with the specified
sc_ref_id
andsc_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
andsc-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
andsc-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:
- Create a URL Variable in GTM to capture
sc-ref-id
andsc-cmp-id
. - Use GTM Triggers to send this data to Google Analytics as custom events or dimensions whenever the URL contains these parameters.
- Create a URL Variable in GTM to capture
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.