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 Consent Settings
If your GTM container uses a Consent Management Platform (such as Cookiebot, OneTrust, or CookieFirst) with Google Consent Mode, you must configure the tag’s consent settings to prevent the script from being blocked.- In the tag editor, expand Advanced Settings
- Scroll down to Consent Settings
- Select “No additional consent required”
ucc) and do not track user identity. Many customers treat them as essential and load them independently of cookie consent banners. Consult your legal team to confirm this aligns with your compliance requirements.
Step 4: 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 5: 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 6: 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=testquery parameters to your website URL: -
Check that the referral cookies are being set in your browser:
- Open Developer Tools → Application → Cookies
- Look for
cello-referralandcello-product-idcookies
-
Test
uccretrieval 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.CelloAttributionfunction is available in consoleucccookies are set when visiting with referral parametersgetUcc()method returns referral codes correctly