Google Tag Manager
Add the Vendo Web Tracking snippet to your website with Google Tag Manager, and send page views in single-page apps.
Last reviewed September 23, 2026
Use Google Tag Manager (GTM) when you cannot edit the code of your website. You add the Vendo snippet as a Custom HTML tag.
Before you start, copy the snippet of your tracking source. See the Quickstart.
Add the Snippet Tag
- In Google Tag Manager, open the container of your website.
- Click Tags.
- Click New.
- Name the tag
Vendo - Web Tracking. - Click Tag Configuration.
- Select Custom HTML.
- Paste the complete Vendo snippet into the HTML field.
- Click Triggering.
- Select Initialization - All Pages.
- Click Save.
The snippet sends a page view when a page loads. For a website that loads a new page for each URL, this is all you need.
Send Page Views in a Single-Page App
In a single-page app, the URL changes without a new page load. Add a second tag that sends a page view on each URL change.
- Click Tags.
- Click New.
- Name the tag
Vendo - Page View on History Change. - Select Custom HTML as the tag type.
- Paste this code into the HTML field:
<script>
vendo('page');
</script>- Click Triggering.
- Create a trigger of the type History Change.
- Click Save.
The History Change trigger does not fire on the first page load. So the first page view comes only from the snippet, and Vendo does not record it 2 times.
Do not use tag sequencing to run the snippet tag again. The snippet sends a page view each time it runs, so you get duplicate page views. The snippet tag fires first because it uses the Initialization - All Pages trigger.
Publish and Check
- Click Preview.
- Enter the address of your website and connect.
- Check that the tag
Vendo - Web Trackingfires on the first page. - Click Submit to publish the container.
Then check that Vendo receives the events. See Check That Vendo Receives the Events.
Send Custom Events from GTM
You can send a Vendo event from a GTM trigger, for example a form submission. Create a Custom HTML tag with the event call:
<script>
vendo('track', 'Newsletter Signup', { form_id: 'footer' });
</script>The call works before and after the SDK loads, because the snippet tag fires first on every page.