The Google tag (gtag.js) is a single tag you can add to your website to use a variety of Google products and services (e.g., Google Ads, Google Analytics, Campaign Manager, Display & Video 360, Search Ads 360). Instead of managing multiple tags for different Google product accounts, you can use the Google tag across your entire website and connect the tag to multiple destinations.
IMPORTANT FOR ALL EUROPEAN SELLERS
If your e-commerce business is located within EU countries, you should setup Consent Settings v2, which comply EU rules. Setup instructions are available in the article linked below:
Add the Google tag to your website
To start collecting data with the Google tag:
1. Open a Google product you use and access the Google tag screen. How to find your tag ID in:
- Google Ads
- Google Analytics
- Google Floodlight
2. Copy your Google tag ID.
3. Paste your Google tag ID in the code sample below. Place the Google tag snippet immediately after the opening <head> HTML tag on every page you want to measure.
<!-- Google tag (gtag.js) -->
<script async scr="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
windows.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>
4. Verify your tag works
To verify if your tag is sending data:
-
- Enter the URL of the website you want to verify.
- Check if your Google tag ID appears in the header Google tags found. If Tag Assistant doesn't recognize your tag, find debug tips in the Tag Assistant help
Comments
0 comments
Please sign in to leave a comment.