Skip to content

Other event codes CPC CPA

Before implementing the event codes, the pixel embed script should be added on every page of the website. Instruction here.

Important!

Remember to replace the PIXEL_ID with your own Pixel ID!

The website administrator is responsible for properly embedding the WP Pixel tracking script, i.e., after the user has given consent.

The script should be embedded in its entirety, and calling the wph('go') function within it signifies the user's consent to tracking.

Withdrawing user consent should result in calling the wph('stop') function.

Important!

If a GDPR consent banner is present, the script must not run before consent is given, and it should run immediately after acceptance (without a page refresh).

In the case of refusal, it must not run either before or after the refusal is selected.

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

<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

<script>
  wph('track', 'Conversion', {
    content_name: 'PriceListEnd',
    currency: 'CURRENCY',
    contents: [
      {
        id: 'PRODUCT_ID1',
        name: 'PRODUCT_NAME1',
        category: 'PRODUCT_CATEGORY1',
        price: PRODUCT_PRICE1
      },
    ],
  });
</script>
Frequently Asked Questions (FAQ)
Data is not being collected properly or there are issues with the Pixel functioning

Make sure that, for example, 'PRODUCT_ID1' is always automatically replaced with the actual product ID on every page — entering it literally will cause malfunction.