Custom Code Loading Options
2 min read
Important:
- This feature is only available for sites with a connected domain.
- This is an advanced feature.
Wix sites are built as single-page applications. This means that when a visitor arrives to your site, there is only one page load event. As site visitors move through your site, via page navigation or by clicking on links, the new page content is loaded dynamically, without the site reloading each time as a new page is requested.
Tracking codes normally respond to a page load event to report that a pageview event occurred on the site. As Wix sites are single page applications, they report only one page load event for the entire site and navigation between pages within the site is reported using an event called 'pushState'.
Alternatively, you can choose to rerun your custom code each time a site visitor navigates to a new page.
Custom code loading options:
Load once (Default option)
With this option, your tracking code is loaded once. Your tracking code that is added to all pages will report one ‘page load’ event when the site is loaded for the first time. Any additional navigation inside the site can be tracked provided that your tracking code supports pushState events.
With this option, your tracking code is loaded once. Your tracking code that is added to all pages will report one ‘page load’ event when the site is loaded for the first time. Any additional navigation inside the site can be tracked provided that your tracking code supports pushState events.
Note:
For this option to correctly report all pageviews seen by your site visitors, you must verify that your code can detect navigation via pushState. Please inquire with the provider of your custom code for more information regarding what page load event the code should be run on (first visit to the site or a new page).
Important:
If you wish to install a custom code that does not appear in the list of tracking options provided, we recommend using Google Tag Manager. Click here to learn more.
Reload on every page
Tracking code is loaded again after every page navigation. This option forces your code to reload every time the user navigates to a new page.
Note: This option is not recommended for tracking pixels.
Tracking code is loaded again after every page navigation. This option forces your code to reload every time the user navigates to a new page.
Note: This option is not recommended for tracking pixels.
Did this help?
|