Paywall impressions and clicks payload script
The Paywall impressions and clicks payload script follows the same structure and variables as the page load event script, with the following key differences:
- wId_2 Value: This field should be populated with the offer ID as shown in the payload in this section.
- action Value: This should be set to either one of the following values:
- 44 for an AI paywall impression event
- 51 for a hard/fixed paywall event
- 43 for a registration wall impression event
- 41 for a dismissable meter impression
- 28 for a paywall click event
- 70 for a registration wall click event
You can refer to the Key Event Types table for more details.
- increaseRA Boolean Value: Determines whether the page contributes to a metering or paywall count. Set this to true as the paywall component will always be served on a page eligible for metering or counting.
<script type="text/javascript">
if (window.ZITFunctions) {
const campaignInfo = {
"brandId": window.ZITFunctions.brandId,
"action": 44,
"wId_2": ["1234-abcd", "5678-efgh"],
"dtId": window.ZITFunctions.retrieveOrigSession(),
"refer": "https://www.google.com/referurl",
"requestUrl": "https://www.publisherdomain/path",
"content": {
"increaseRA": true,
"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>
