Prerequisites
Before you begin, ensure you have:- A Google Tag Manager account and container set up on your website
- Admin access to your GTM container
- Your Cello product ID from the Cello Portal
Step 1: Create a New Tag
- Log in to your Google Tag Manager account
- Select the container for your website
- Click Tags in the left sidebar
- Click the New button to create a new tag
- Click the Tag Configuration area
Step 2: Add the Cello Attribution Script
- Select Custom HTML as the tag type
- In the HTML field, paste the following code:
- Name your tag (e.g., “Cello Attribution Script”)
Step 3: Configure the Trigger
- Click the Triggering area
- Choose when you want the Cello attribution script to load:
Option A: All Pages (Recommended)
- Select All Pages trigger
- This ensures referral codes are captured on any landing page
Option B: Specific Pages Only
If you only want to track attribution on specific pages:- Click the + to create a new trigger
- Select Page View → Some Page Views
- Configure conditions (e.g., Page URL contains “landing” or “signup”)
Step 4: Save and Publish
- Click Save to save your tag
- Give your tag a descriptive name (e.g., “Cello Attribution - All Pages”)
- Click Submit to create a new version
- Add a version description (e.g., “Added Cello referral attribution tracking”)
- Click Publish to make the changes live
Step 5: Test Your Installation
Method 1: Browser Console Test
- Open your website in a new browser tab
- Open the browser’s developer console (F12)
- Type the following command:
Method 2: Test with Referral Parameters
-
Add the
?ucc=test123&productId=test
query parameters to your website URL: -
Check that the referral cookies are being set in your browser:
- Open Developer Tools → Application → Cookies
- Look for
cello-referral
andcello-product-id
cookies
-
Test
ucc
retrieval in the console:Expected output:ucc: test123
Method 3: GTM Preview Mode
- In GTM, click Preview to enter debug mode
- Visit your website - you should see the GTM debug panel
- Verify that your “Cello Attribution Script” tag is firing on the correct pages
Success indicators:
- Cello attribution tag fires in GTM preview
window.CelloAttribution
function is available in consoleucc
cookies are set when visiting with referral parametersgetUcc()
method returns referral codes correctly