Skip to main content
All CollectionsGet startedConversion Tracking
Configure Custom Events for B2B & B2C
Configure Custom Events for B2B & B2C

Learn how to configure website events for the Billy Pixel

Tim Schouten avatar
Written by Tim Schouten
Updated over 2 months ago

Creating a New Custom Event (B2B / B2C)

Expertise in Google Tag Manager is required before following the next steps. If you don't have access to someone who has experience with Google Tag Manager, we are happy to link you to one of our partners to help you set up Custom Events. Get in touch via: hello@billygrace.com or send a chat to support via the in-app messenger.

Set up a Custom Event

In this guide, we describe the steps that need to be taken using Google Tag Manager. Of course, other tagging software can be used as well. First, you will need to create a trigger that fires when the event is completed. As an example, in this guide we will take the completion of a contact form on the website. Of course, in reality, the completed Custom Event can be any commercial goal you have on your website.

Important: Events in Billy Grace are deduplicated. If, for example, an event is triggered twice in a short time, it will not be counted. We recommend always adding a unique event ID to the custom event. The unique event ID will automatically be used in the filtering events.

For this example, we will use the thank you page URL as the trigger. For example, when a user finishes a form on the Billy Grace website, the landing page after the form is: billygrace.com/thank-you/

When a user reaches: billygrace.com/thank-you/ this tells us that the user completed the form. In Google Tag Manager, we will create a trigger that fires when a user lands on this page.

In Google Tag Manager, navigate to Triggers and click on New

screenshot

Assign a name to the trigger, for example: Trigger Group | Form Thank you. As Trigger Type select Page View.

Select This trigger fires on Some Page Views. As event select Page URL - contains: billygrace.com/thankyou/

Click on Save and navigate to tags.

We are now going to create a new tag with the script that the Billy Pixel can measure. The tag will fire based on the trigger we just configured. On the Tags page, click on New.

screenshot

Assign a name to the tag and click on Tag Configuration. We will use the Custom HTML tag. In the HTML, paste the following code:

<script>
BillyPix('event', 'InsertEventName')
</script>

Replace InsertEventName with the name of the event. Keep in mind that this name should correspond with the name of the Custom Event in Billy Grace. No worries If you didn't create Custom Event in Billy Grace yet. The Pixel will automatically create new incoming Custom Events and show them on the Custom Event page under Settings in Billy Grace.

You can expand this script with Event Value, if you add an event value to a Custom Event then in BG we will use this value to calculate the CPA and ROAS in paid advertising reports. We recommend to always add a unique transaction_id per event. This will help Billy Grace to accurately report the total number of events.

We support the following parameters for Event Value:

<script>
BillyPix('event', 'InsertEventName',{
transaction_id: {{InsertUniqueID}},
value: {{InsertEventValue}}});
</script>

As Trigger, select the form completion trigger.

To make sure the tag only fires after the Billy Snippet tag has loaded on the page, you can configure the Tag Sequencing under Advanced Settings.

The Tag will look like this:

Now Save and Submit the changes Triggers and Tags to the live website.

Once the events are firing on your website, you can activate them in Billy Grace. Go to Custom Events under Settings on app.billygrace.com.

Here you have the option to create new Events or activate Events that are picked up by the Pixel. After activation, the Events are selectable in your report as Goal filter. Selecting an event will show the event (or Goal as we could call it) performance.

Frequently Asked Questions

After configuring Custom Events, we get uncaught reference errors in the inspect console?

This can happen because the Billy Pixel isn't initialized yet when the Custom Event fires. In this case we advise to add tag sequencing to the Custom Event in which you set the Pixel to always fire before the Custom Event. Below, a more detailed explanation on how to do this.

I installed the tags correctly in Tag Manager, I tested them in Debug mode, but they are not coming in Billy Grace. What can I do?

You probably need to change the settings of your Tag Manager Tags. We want the Billy Grace Pixel to fire before the event occurs. How do I fix this?

  1. Go to your Tags in Tag Manager;

  2. Click on your Tag and go to “advanced settings”;

  3. Here you can click on “Tag Sequencing”

  4. Click on “Fire a tag before ‘Insert your custom event’” fires;

  5. Select your Billy Grace Pixel as Set up Tag;

  6. Repeat this for all your Billy Grace Tags in Tag Manager;

Hereby a video showing the steps to adjust tag sequencing.

The next day your events will be added to your account, if not please contact our support team.

Did this answer your question?