This can either be defined globally on initialization of the tracking api:
_paq.push(['trackVisibleContentImpressions', true, 750, 50]); // 50px offset
or per element using a tag:
Hi @JE4GLE, thanks for taking the time to create this issue! From what I know,
trackVisibleContentImpressions shouldn't track images that aren't visible. I tested it just now and it seems to work as expected (on Chrome). Could you provide an example HTML file where it doesn't work like this as well as the browser used to view the example?
I think is was just a loading issue with some CSS, which got loaded after the initialization of the tracking code. This way, the page shifted a bit and moved the elements out of sight.
@JE4GLE so they were visible on page load for a brief moment, then the css moved or hid them, and the problem is that they were tracked before the css moved them, is this understanding correct?
Yes, I have one stylesheet for the whole page loaded at the end of the page (but before the tracking script)
Hi @JE4GLE, I tried reproducing this (w/ the stylesheet at the end of the page before the tracking), and was still not able to reproduce. Would you be willing to share the website that this is occurring on over email? If so email firstname.lastname@example.org. If you could also tell me what browser you're using that would help as well.
As discussed via email, this is likely a race condition with the stylesheet being loaded after the JS is executed. I'll close this for now, but feel free to reopen it.