Skip to main content

Shortcodes

In order to be able to track leads as conversions, the plugin provides shortcodes. They need to be added to the thankyou pages to which lead forms redirect to after a form submission.

Additionally, there is one shortcode for the view-item event. It would be typically used on custom-made product pages, where WooCommerce can't determine if it is a product page and therefore the plugin can't automatically inject the necessary scripts for the view-item event. (The view-item event is equals to the ViewContent event in Meta (Facebook), etc.)

Examples

Fire all pixels with one shortcode

The following shortcode shows how to fire all tracking pixels with one shortcode. However, Google Ads and LinkedIn always require an event ID.

[conversion-pixel pixel="all" gads-conversion-label="aabbcc" lintrk-event="1234567"]

Fire all pixels with one shortcode and override default values

If you want to fire all tracking pixels and override the default values for most of the pixels, you can use the following shortcode. Be aware that Google Ads and LinkedIn always require an event ID.

[conversion-pixel pixel="all" gads-conversion-label="aabbccdd" meta-event="Schedule" twc-event="Signup" pinc-event="Signup" pinc-lead-type="test-type" snap-event="SIGN_UP" tiktok-event="SubmitForm" lintrk-event="1234567"]

Fire each pixel individually

The following examples show how to fire each pixel individually.

[conversion-pixel pixel="google-ads" gads-conversion-label="abcdefg"]

[conversion-pixel pixel="linkedin" lintrk-event="1234567"]

[conversion-pixel pixel="meta"]

[conversion-pixel pixel="meta" meta-event="Schedule"]

[conversion-pixel pixel="ms-ads"]

[conversion-pixel pixel="pinterest"]

[conversion-pixel pixel="pinterest" pinc-event="Signup"]

[conversion-pixel pixel="pinterest" pinc-event="Signup" pinc-lead-type="test-type"]

[conversion-pixel pixel="reddit"]

[conversion-pixel pixel="snapchat" snap-event="SIGN_UP"]

[conversion-pixel pixel="tiktok" tiktok-event="SubmitForm"]

[conversion-pixel pixel="twitter"]

[conversion-pixel pixel="twitter" twc-event="Signup"]

[view-item pixel-id="14"]

General Instructions

The only required parameter for all use cases is pixel. With this parameter you can choose which conversion pixel to fire, or, if you want to fire all of them.

pixel="google-ads"

pixel="all"

All pixels use default parameters that can be overridden.

For each Google Ads conversion you need to set the gads-conversion-label. It is the only required parameter for a Google Ads lead conversion.

[conversion-pixel pixel="google-ads" gads-conversion-label="abcdefg"]

If you need to you can also set the gads-conversion-id as additional parameter. If you omit that parameter, the plugin will automatically use the conversion ID which is set in the plugin.

info

More information on conversion tracking you'll find on the Google Ads support pages here and here

LinkedIn

The LinkedIn always requires an event ID.

[conversion-pixel pixel="linkedin" lintrk-event="1234567"]

Set up a new conversion in the LinkedIn Ads Manager and use the generated conversion ID as the lintrk-event parameter.

Meta (Facebook)

For the Meta (Facebook) lead conversion shortcode there are no required parameters other than the pixel parameter. By default, the event type is being reported as Lead.

[conversion-pixel pixel="meta"]

In order to override the default event you can set the meta-event parameter.

[conversion-pixel pixel="meta" meta-event="Schedule"]

info

More information on events you'll find on the Meta (Facebook) developer pages here

info

When you use shortcodes to track custom events, and Meta (Facebook) CAPI is enabled, the Pixel Manager will automatically process those custom events through CAPI too.

Microsoft Ads

!> This shortcode is in beta. Microsoft's documentation is not very clear on some parts of how to configure a lead conversion.

For the Microsoft Ads lead conversion shortcode there are no required parameters other than the pixel parameter. By default, the event is being reported as submit and the event label as lead.

[conversion-pixel pixel="ms-ads"]

You can set an override all the following parameters:

ms-ads-event

ms-ads-event-category

ms-ads-event-label

ms-ads-event-value

info

More information on events you'll find on the Microsoft Ads developer pages here

Outbrain

For the Outbrain conversion shortcode you need to set up a conversion in Outbrain. The JavaScript event names are not standardized in Outbrain. That means in the shortcode outbrain-event name you need to use exactly the name that you given during the setup. Capitalization matters, so make sure to write everything in lower caps.

Example: Create a new conversion for the lead event in Outbrain. As the name for the event write lead, all in lower caps. This is the name that you need to use as outbrain-event name.

Here is a list of event names that we recommend using:

  • registration
  • email_sign_up
  • lead
  • download
  • other

Here's an example of how the shortcode could look like:

[conversion-pixel pixel="outbrain" outbrain-event="lead"]

Pinterest

For the Pinterest lead conversion shortcode there are no required parameters other than the pixel parameter. By default, the event is being reported as lead.

[conversion-pixel pixel="pinterest"]

In order to override the default event you can set the pinc-event parameter.

[conversion-pixel pixel="pinterest" pinc-event="signup"]

Additionally, you can set the lead-type parameter which is empty by default:

[conversion-pixel pixel="pinterest" pinc-event="signup" pinc-lead-type="New release promotion"]

info

More information on events you'll find on the Pinterest developer pages here and here

Reddit

For the Reddit lead conversion shortcode there are no required parameters other than the pixel parameter. By default, the event is being reported as Lead.

[conversion-pixel pixel="reddit"]

In order to override the default event you can set the reddit-event parameter.

[conversion-pixel pixel="reddit" reddit-event="SignUp"]

Snapchat

For the Snapchat lead conversion shortcode there are no required parameters other than the pixel parameter. By default, the event is being reported as SIGN_UP.

[conversion-pixel pixel="snapchat"]

In order to override the default event you can set the snap-event parameter.

[conversion-pixel pixel="snapchat" snap-event="SIGN_UP"]

info

More information on events you'll find on the Snapchat developer pages over here

Taboola

For the Taboola conversion shortcode to work you need to set up the event in the Taboola conversion setup.

Example: Create a new conversion for the lead event in Taboola. Write down the event name that is shown in the code example at the bottom of the setup window. This is the name that you need to use as taboola-event name.

[conversion-pixel pixel="taboola" taboola-event="lead"]

TikTok

For the TikTok lead conversion shortcode there are no required parameters other than the pixel parameter. By default, the event is being reported as SubmitForm.

[conversion-pixel pixel="tiktok"]

In order to override the default event you can set the tiktok-event parameter.

[conversion-pixel pixel="tiktok" tiktok-event="SubmitForm"]

info

More information on events you'll find on the TikTok developer pages over here

Twitter

For the Twitter lead conversion shortcode there are no required parameters other than the pixel parameter. By default, the event is being reported as CompleteRegistration.

[conversion-pixel pixel="twitter"]

In order to override the default event you can set the twc-event parameter.

[conversion-pixel pixel="twitter" twc-event="Signup"]

With the new version of the Twitter pixel you will need to create the Lead (or Signup) event in the Twitter Ads Manager. Then use the generated event ID as the twc-event parameter.

[conversion-pixel pixel="twitter" twc-event="tw-abcde-12345"]

info

More information on events you'll find on the Twitter developer pages here

view-item shortcode

The view-item shortcode fires all enabled pixels with their own view-item event, including all product information. That shortcode is necessary on custom-made product pages where WooCommerce can't detect that it is a product page and therefore the Pixel Manager can't automatically inject the necessary scripts for the view-item event.

In order to fire the view-item event on a custom product page add the following shortcode:

[view-item product-id="14"]

The product-id must contain the post ID of the product where all product information is stored.

Make more money from your ads with high-precision tracking