Google Tag Manager Installation
Installing VersaTailor through Google Tag Manager (GTM) allows you to manage your tracking script alongside other marketing tools. This method is ideal for websites that already use GTM for analytics and marketing tags.
💡 Prerequisites: You need to have Google Tag Manager already installed on your website and access to your GTM container.
Step 1: Get Your Tracking Script
- Log in to your VersaTailor dashboard
- Click on the website dropdown in the top navigation
- Select "Site Settings" from the dropdown menu
- In the General tab, copy your unique tracking script
Your tracking script will look like this:
<script
defer
src="https://versatailor.com/script.js"
data-website-id="your-website-id-here"
data-domain="yourdomain.com"
></script>
Step 2: Create a Custom HTML Tag in GTM
- Open your Google Tag Manager container
- Click on "Tags" in the left sidebar
- Click the "New" button to create a new tag
- Click on "Tag Configuration" and select "Custom HTML"
- Paste your VersaTailor tracking script into the HTML field
- Name your tag (e.g., "VersaTailor Tracking Script")
Step 3: Configure the Trigger
- Click on "Triggering" in the tag configuration
- Select "All Pages" trigger (or create a custom trigger if needed)
- This ensures the VersaTailor script loads on every page
Step 4: Test and Publish
- Click "Save" to save your tag
- Use GTM's "Preview" mode to test the tag on your website
- Verify that the VersaTailor script is firing correctly
- Once tested, click "Submit" to publish your changes
- Add a version name and description, then click "Publish"
Verify Installation
After publishing, return to your VersaTailor dashboard and use the "Verify Installation" button in Site Settings to confirm your tracking script is working properly.
Advanced: Custom Event Tracking
Once your base tracking is set up, you can create additional GTM tags for custom events like purchases or conversions:
// Example: Track payment events through GTM
window?.versatailor("payment", {
email: "customer@example.com",
amnt: 2999, // $29.99 in cents
});
⚠️ Important: When using GTM, make sure the VersaTailor script loads before any custom event tracking tags. You can set tag firing order in GTM's advanced settings if needed.
Need help? Contact us for assistance.
Suggest features? We'd love your feedback