Other event codes CPC CPA
Before implementing the event codes, the pixel embed script should be added on every page of the website. Instruction
Event code template
<script>
wph('track', 'event_name', {
content_name: 'content_name', other_parameters });
</script>
The parameters and values of event_name, content_name, and other_parameters are detailed in:
Available events and required parameters
Examples
View
Applied on: homepage and all other subpages of the website. Purpose: a general code snippet applied across the entire website, it's an analytical event. Event is triggered on init.
<script>
wph('track', 'ViewContent', { content_name: 'View' });
</script>
LandingPage
Applied on: the homepage of the website. Purpose: analytical event that tracks number of visits. Event is triggered on init.
<script>
wph('track', 'ViewContent', { content_name: 'LandingPage' });
</script>
Helper event - InputForm
Applied on: all pages of the site containing a contact form. Purpose: analytical event that tracks the number of interactions with the form. Event is triggered on init or upon user interaction with the form (recommended).
<script>
wph('track', 'ViewContent', { content_name: 'InputForm' });
</script>
Conversion event - Lead
Applied on: all pages of the site containing a contact form. Purpose: analytical event that tracks the number of contact form submissions (conversions). Event is triggered upon confirmation of form submission.
<script>
wph('track', 'Conversion', { content_name: 'Lead' });
</script>
Conversion event – PriceListEnd
Applied on: pages containing the price list or allowing users to download the price list (recommended). Purpose: analytical event that tracks price list downloads. Event is triggered at the moment of download (click or event request).
<script>
wph('track', 'Conversion', {
content_name: 'PriceListEnd',
currency: 'CURRENCY',
contents: [
{
id: 'PRODUCT_ID1',
name: 'PRODUCT_NAME1',
category: 'PRODUCT_CATEGORY1',
price: PRODUCT_PRICE1
},
],
});
</script>