How to Load Script on One Domain and Exclude Previews in HubSpot [HubL Snippet]

Get FREE HubSpot Tutorial for Beginners PDF
How to Load Script on One Domain and Exclude Previews in HubSpot [HubL Snippet]

The HubL code below will help you scope heatmap or anlytics tracking on one domain and exclude any previews.

{% if request.domain == 'www.yourdomain.com' and request.query is not string_containing 'hs_preview' %}

{% endif %}

Written by: Jake Lett
I share digital marketing tips and HubSpot tutorials to help marketers and business owners grow their business.

Related posts

Tags: ,

Want to Get Email Updates of New Articles?

Join My Email Newsletter