How to work with URLs in Dynamic Heatmaps
When using Dynamic Heatmaps, there is an advanced feature within segmentation that allows for the heatmap to be segmented by URL structure. In this article, you’ll find:
- What is URL structure and why does it matter?
- How to use hosts, paths, queries and fragments
- How to change the structure within Dynamic Heatmaps
- Example of URL structure changes
What is URL structure and why does it matter?
Your website is comprised of pages upon pages of unique URLS. As you grow your website and product collections, you likely have dynamic URLs such as www.mystore.com/products/shoes/view?id=ji3oafjs.
By default, when you run a Dynamic Heatmap, you would see heatmap data for that exact page. This information can be useful, but what if you want to analyze all of your product pages together? Instead of going page by page to analyze engagement, you can modify the URL structure to see a Dynamic Heatmap of aggregate content across multiple pages.
Note: While this segmentation is normally used on Dynamic Heatmaps, it can also be used for Form Analytics.
How to use hosts, paths, queries and fragments
Dynamic Heatmaps splits up URLs into four distinct parts to make it easier to modify the URL structure:
Let’s take the example from above: www.mystore.com/products/shoes/view?id=ji3oafjs#details
URL Structure | Example |
Host | mystore.com |
Path | products/shoes/view |
Query | ji3oafjs |
Fragment | details |
How to change the structure within Dynamic Heatmaps
- Open a Dynamic Heatmap on your desired page
- Click Segments in the upper left corner
- Scroll past your segmentation filters
- Located below Options and the blue Save this segmentation button, you’ll find the URL Structure:
- Click your desired URL structure (host, path, query or fragment):
- Change the matching type as needed:
- Matches exactly: This is best used for exact matches of URL structures. It is the default setting when the Dynamic Heatmap initially populates data
- Contains: This is best used to search for part of a URL structure, such as a specific collection or UTM parameter
- Regular expression: This is best used when the wildcard (*) denotes a value in your links. See the example below for more information.
- Make sure the blue checkbox is shown next to Updates on URL change at the bottom of the Segmentation box. If not, click the checkbox to enable it.
- Click the green Update button to update your Dynamic Heatmap
Note: The URL structure isn’t saved as part of segmentation, allowing for enhanced flexibility across all pages.
Example of URL structure changes
Let’s say you want to evaluate these product pages:
- www.mystore.com/products/shoes/view?id=ji3oafjs
- www.mystore.com/products/shoes/view?id=jo42xfk&utm_source=facebook&utm_id=winterpromo#details
- www.mystore.com/products/shoes/view?id=jm723sip&utm_source=facebook&utm_id=winterpromo#details
- www.mystore.com/products/shoes/view?id=tv9ip8vx#details
Note the addition of UTM parameters to two of the links indicating a campaign featuring those products.
For all product pages
Update Path to Match exactly with Products
For all shoe products
Update Query to Regular expression with id=j*
For products featured on Facebook
Update Query to Contains with facebook