Goals & Events
Goals are used to measure how often users complete specific actions. They represent important events on your website that contribute to the success of your business. Common examples of goals are:
- Submitted a newsletter popup
- Adding a product to the cart
- Completing a purchase
- Creating an account
- Logged in
- Reviewed products
Using and defining goals is a fundamental component of any digital marketing plan because they help you see what's working and what's not. They also help you to segment your visitors. Having properly configured goals allows Triggerbee to provide you with critical information, such as the number of conversions and the conversion rate for your website. Without this information, it's almost impossible to evaluate the effectiveness of your business online and marketing campaigns.
How to use Goals in Triggerbee
Besides measuring the success of your website, goals are a critical part of getting the most out of Triggerbee.
Triggerbee uses Goals to:
- Trigger automatic workflows
- Target Campaigns for specific audiences
- Create filters in your visitor list and your profiles
- Highlight important sessions on your visitor list
You can control almost everything in Triggerbee with Goals, so it's very important that you learn how to use them and work with them.
Different types of goals
All goals have the same visual appearance in Triggerbee. To indicate that a goal has been fulfilled, the visitor will get a badge for each goal. Together with the badge, is the name of the goal.
However, they can come from different types of events. Some goals are automatic (such as the campaign events), and some are custom and can be defined through their URL or button clicks (eg. visiting /checkout/thankyou means that a purchase has been completed). But if you want to log more advanced events you will need to use JavaScript. We recommend that you use Google Tag Manager to set up your Javascript goals. If that is not a possibility, please have your developers read this guide on how to log goals to us via our Javascript API.
How to set up goals
Custom goals can be defined via their URL or through Javascript. Goals can also be logged on events in your campaigns.
Set up a goal via URL/Pathname
- Navigate to Customization --> Events
- Create a new goal
Give your goal a name, and add the pathname of the URL that you want to trigger this goal. It is possible to work with wildcards to include several paths in your goal. Use the funnel goal if you want your visitors to have come through a certain path in order to fulfill your goal.
Log a goal on a button click in your campaign
When creating a campaign, you sometimes have more than one button. By default, Triggerbee will count clicks on both of those buttons to the campaign's total statistics. If you wish to differentiate clicks from each button, you can easily do so by adding a goal to each button - which you can then follow up on in the Visitor feed or Analytics Page. Simply activate the "Log a goal" feature on your button in the campaign editor, and enter a name for your goal.
Set up goals via URL
Goals can be logged through incoming links as well, perhaps if you want to tag specific emails without using UTM-tags. This is simply done by adding utm_goal=yourgoalname to the URL.
Eg: https://www.yourwebsite.com/?utm_goal=clicked_on_my_link
Set up goals via Javascript
As a developer, you have complete freedom when it comes to keeping track of important events contributing to your online success. In Triggerbee, events are called Goals and can be logged via Javascript. The scripts can be put in your source code or added via GTM or any other Tag Manager.
These are some common examples of goals that are good to have in Triggerbee
- Added to Cart
- Initiated Purchase
- Purchase
- Registrered Membership
- Logged In
Note: You do not need to create the goals in the Triggerbee app before logging them via JavaScript. They are automatically created when called for.
Script Examples
Use this method to add a basic goal. Just replace the name for each event.
triggerbee.event({ type: 'goal', name: 'Added to Cart' });
triggerbee.event({ type: 'goal', name: 'Logged in', data: { identity: { email: 'someone@triggerbee.com' } } });
For purchases, use this snippet instead (note that type is now "purchase") to also add Revenue and CouponCode for us to be able to attribute campaign interactions and provide ROI on your campaigns in Triggerbee. Set couponCode to undefined if none was used.
triggerbee.event({ type: 'purchase', data: { couponCode: 'welcome15', revenue: 1500, identity: { email: 'someone@triggerbee.com' } } });
Note: The event scripts can only be used after the entire Triggerbee tracking script has loaded making the mtr-object available. This is done by utilizing the afterTriggerbeeReady
event listener, eg:
window.addEventListener('afterTriggerbeeReady', () => {
/* do something after Triggerbee has initizalied */
});