Page load event script
The Page Load Event script is used for all Page Load (21) events. It shares the same structure and variables as the Paywall Impressions and Clicks Script, with the following key differences:
- wId_2 Value: This field should remain empty during a page load, as shown in the payload below.
- increaseRA Boolean Value: Determines whether the page contributes to a metering or paywall count. Set to true if the page is eligible for metering/paywall restrictions; otherwise, set to false. See the variable field descriptions for more information.
<script type="text/javascript"> if (window.ZITFunctions) { const campaignInfo = { "brandId": window.ZITFunctions.brandId, "action": 21, "wId_2": [""], "dtId": window.ZITFunctions.retrieveOrigSession(), "refer": "https://www.google.com/referurl", "requestUrl": "https://www.publisherdomain/path", "content": { "increaseRA": "true", "articleId": "xxxxxxxxxxxxx", "section": "politics", "subSection": "local", "articleType": "long-form", "articleClass": "free" }, "user": { "userState": window.ZITFunctions.retrieveUserStatus(), "userId": "1234-5678-abcd-efgh", "knownDate": "12-12-23", "isTrial": true, "isLapsed": false }, "product": { "offerName": "24+: offerte pop up", "offerKey": "123" }, "context": { "countryCode": "GBR", "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1", "referSource": "www.google.com", "custom": { "variable_1": "industry", "variable_2": "position", "variable_3": "responsibility" } } }; if (typeof window.ZITFunctions.sendData === "function") { window.ZITFunctions.sendData(campaignInfo); } else { console.error("sendData function is not defined."); } } else { console.error("Incomplete data in sessionStorage."); } </script>