viewPage
awoo Pixel Event for all webpages loaded. 👀
✨ Introduction
The viewPage event is designed to trace and record instances when a user views a specific page on your website. This event serves as a silent observer, meticulously documenting which webpage has been viewed as users navigate through the website. The accumulating count of viewPage will serve as an essential reference for session count on the awoo AMP dashboard.
⭐ JS Snippet of viewPage
Below is the JavaScript snippet for the viewPage event. To correctly trace a user's viewing journey on your website, you should embed it into every webpage without any modification.
<script type="text/javascript">
awpx('event', 'viewPage');
</script>
🌟 Triggering Condition
The viewPage event above should be triggered when a webpage is loaded.
Beware that awoo Pixel's initialization should be executed before viewPage is triggered. Hence, you may need to add a "defer" attribute to those two scripts to have them executed in the order they appear in the webpage's HTML. Placing viewPage snippet just before the closing </body>
tag helps preserve the execution order of the scripts as well. Check the following code block for sample implementations:
<script type="text/javascript" defer>
// awoo Pixel's initialization
</script>
<script type="text/javascript" defer>
awpx('event', 'viewPage');
</script>
<html>
<body>
<!-- Your HTML content goes here -->
<script type="text/javascript">
awpx('event', 'viewPage');
</script>
</body>
</html>
There should be only one awoo Pixel's initializationMultiple awoo Pixel's initialization on a single webpage will cause error, so make sure you only have it loaded once per page.
🌠 Implement with GTM
For your better comprehension, below are the sample screenshots from GTM (Google Tag Manager) for the implementation of viewPage event. The JavaScript snippet is inserted as a custom HTML tag, with the triggering condition set to All Pages - Page View. You may need to modify the actual implementation based on your website. Beware that awoo Pixel's initialization should be loaded before any triggered event.

insert viewPage event as a custom HTML on GTM

suggested triggering condition for viewPage event on GTM
Edited by: Justin Sung
Updated 4 months ago