How to Identify and Correct Lazy Loading for Your Website Tracking Pixel
What is Lazy Loading and How to Avoid it with your Pearl Diver Tracking Pixel
Lazy loading is a technique used in software and website development where resources, such as images or data, are loaded only when they are actually needed or requested. Instead of loading everything upfront, lazy loading delays the loading process until the resource is clicked specifically or the user scrolls down the website to the related element to activate it.
In the case of a website, this function reduces initial load time as it only loads elements as consumers are navigating around your site. When it comes to the tracking pixel installed on your site, this does not need lazy loading applied as it runs across all pages, and needs to activate in the background. This means it needs to be excluded from lazy loading applying. This will not impact the load time of your website as it is a background process.
You will need to exclude the Pearl Diver tracking pixel from having lazy loading as this will prevent the data flowing into your Pearl Diver account.
👀Check for Lazy Loading
- Got to the website URL where you loaded the tracking pixel
- Right-click and select inspect from the menu or press the F12 Key
- In the elements section, CTRL + F and search for the keyword ‘tag.pearldiver’. If this displays the pixel is likely firing correctly, if you have installed the code correctly and can't see the code on the website, it's likely due to lazy loading.
✅Disable/Exclude Lazy Loading
-
Login to your WordPress dashboard
-
On the top bar, hover over WP Rocket and select Settings
-
Under Media add an exception for Pearl
-
Click ‘File Optimization (Optimize CSS & JS)’
-
Scroll down to ‘Excluded JavaScript Files’ and enter the text https://tag.pearldiver.io/
-
Save Changes
-
Check the website again and if you are still having any issues, please book a call here.