Skip to main content

Setting Up Tracking: Google Analytics, Meta Pixel, and More

Guide to integrating tracking tools like Google Analytics, Meta Pixel, and other analytics services.

Gil Chan avatar
Written by Gil Chan
Updated over a week ago

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:

  1. Head Section - Loads before page content (recommended for most tracking)

  2. End of Body - Loads after page content


Adding Tracking Scripts

Step 1: Access Template Settings

  1. Go to your CraftedStays dashboard

  2. Navigate to Site > Manage Template

  3. Look for 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

  1. Create or select your property

  2. Go to Admin > Data Streams > Web

  3. Copy the Measurement ID (starts with G-)

  4. 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

  1. Create or select your container

  2. 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

  1. Select or create your Pixel

  2. Click Settings > Install Code Manually

  3. 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

  1. Set up your tracking normally

  2. In Google Analytics, create segments or filters by URL

  3. 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:

  1. They click "Book Now" on your site

  2. They're redirected to your PMS (OwnerRez, Hospitable, etc.)

  3. 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

  1. Go to Analytics > Real-time

  2. Visit your site in another browser

  3. You should see yourself as an active user

Meta Pixel

  1. Install Facebook Pixel Helper extension

  2. Visit your site

  3. Extension should show pixel firing

Google Tag Manager

  1. Use Preview mode in GTM

  2. Visit your site

  3. See which tags fired


Troubleshooting

Tracking not working

  1. Verify code was saved correctly

  2. Check for JavaScript errors (browser console)

  3. Make sure code is in the right location (head vs body)

  4. Clear cache and test in incognito

Double-counting pageviews

  1. Check you don't have duplicate tracking codes

  2. 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


Related Articles

Did this answer your question?