Overview
Add tracking scripts to your CraftedStays site to understand your visitors, track conversions, and optimize your marketing.
Built-in Analytics Support
CraftedStays templates support custom JavaScript for tracking. You can add scripts in two locations:
Head Section - Loads before page content (recommended for most tracking)
End of Body - Loads after page content
Adding Tracking Scripts
Step 1: Access Template Settings
Step 2: Find JavaScript Settings
Look for these fields:
Custom JavaScript (In Head Section)
Custom JavaScript (End of Body)
Step 3: Paste Your Code
Add your tracking scripts in the appropriate field and save.
Google Analytics (GA4)
Getting Your Tracking Code
Go to analytics.google.com
Create or select your property
Go to Admin > Data Streams > Web
Copy the Measurement ID (starts with G-)
Get the full script from Tagging Instructions > Add new on-page tag > Install Manually
Adding to CraftedStays
Paste in Custom JavaScript (In Head Section):
`html `Replace G-XXXXXXXXXX with your Measurement ID.
Google Tag Manager
For more complex tracking setups, use Google Tag Manager:
Getting Your Container Code
Go to tagmanager.google.com
Create or select your container
Copy the container code (GTM-XXXXXX)
Adding to CraftedStays
Paste in Custom JavaScript (In Head Section):`html `Replace GTM-XXXXXX with your container ID.
Meta (Facebook) Pixel
Getting Your Pixel Code
Go to Facebook Events Manager
Select or create your Pixel
Click Settings > Install Code Manually
Copy the Pixel base code
Adding to CraftedStays
Paste in Custom JavaScript (In Head Section):`html `Replace YOUR_PIXEL_ID with your pixel ID.
Property-Specific Tracking
To track views of specific properties:
Using URL Filtering
Set up your tracking normally
In Google Analytics, create segments or filters by URL
Property URLs follow pattern:
/property/property-slug`
Using Custom Events (Advanced)
With Google Tag Manager, you can fire events based on:
Page URL contains "property"
Specific property page visits
Button clicks
Conversion Tracking Limitations
Important: CraftedStays doesn't have a dedicated booking confirmation page.
When a guest books:
They click "Book Now" on your site
They're redirected to your PMS (OwnerRez, Hospitable, etc.)
Booking completes on the PMS
This means:
You can track "Book Now" button clicks
You cannot directly track completed bookings with standard pixel setup
For full conversion tracking, integrate tracking in your PMS if supported
Testing Your Tracking
Google Analytics
Go to Analytics > Real-time
Visit your site in another browser
You should see yourself as an active user
Meta Pixel
Install Facebook Pixel Helper extension
Visit your site
Extension should show pixel firing
Google Tag Manager
Use Preview mode in GTM
Visit your site
See which tags fired
Troubleshooting
Tracking not working
Verify code was saved correctly
Check for JavaScript errors (browser console)
Make sure code is in the right location (head vs body)
Clear cache and test in incognito
Double-counting pageviews
Check you don't have duplicate tracking codes
One in template settings, one elsewhere
Need booking conversions
Contact your PMS about conversion tracking options, or use:
Thank you page tracking in PMS (if supported)
UTM parameters to track source in PMS

