- 13 Sep 2024
- Print
- DarkLight
- PDF
Setting Up Affiliate Tracking with Salesforce Commerce Cloud
- Updated on 13 Sep 2024
- Print
- DarkLight
- PDF
GRIN lets you generate custom links for your Influencers, called affiliate links, to share with their audience and refer them to your products. GRIN also lets you track conversions on affiliate links, which means we can track when an affiliate link is used to make purchases in your store and attribute these purchases to the associated Influencer. This is great for tracking your ROI and which of your Influencers are the most successful.
To track affiliate link conversions in your Commerce Cloud site, you first need to set up the affiliate integration.
What You'll Need
- The GRIN cartridge already installed in your Commerce Cloud environment.
- Your brand you want to integrate with already set up in GRIN.
Code Changes
- Load the
templates/include/grinFooter.isml
template from theint_grin
cartridge. - Include the template in the footer of every page.
- For SFRA-based environments, the template is located at:
templates/default/components/footer/pageFooter.isml
- For SFRA-based environments, the template is located at:
< iscomment > GRIN SDK</ iscomment >
< isinclude template = "/include/grinFooter" />
- Load the
templates/tracking/grinConversionTracking.isml
template from theint_grin
cartridge. - Include the template in the confirmation page after a successful checkout.
- For SFRA-based environments, the template is located at
templates/default/checkout/confirmation/confirmation.isml
- For SFRA-based environments, the template is located at
<iscomment>GRIN conversion tracking</iscomment>
<isinclude template="tracking/grinConversionTracking" />
You should now have both the JavaScript SDK library and conversion tracking script included. Your integration is now complete and ready to be tested.
Enabling the Integration
You can enable the SDK and conversion scripts by changing the GRIN configurations in the Business Manager. This lets you choose when you want to track affiliate conversions. To enable the integration:
- Go to your Business Manager.
- Navigate to Merchant Tools > Site Preferences > Custom Preferences.
- Click on GRIN Configuration.
- Select Yes for Enable GRIN Conversion Tracking.
- Enter the URL for the GRIN Conversion Tracking SDK URL.
Congratulations! You're now set up to track affiliate link conversions in GRIN.