Revenue Hero provides JavaScript Events [docs] as a mechanism for attaching tracking onto website events.
Calendar Events
Say, for example, you have a funnel stage called Demo Booked that tracks a calendar event. You will need to create a new JavaScript Integration in revenue hero, and add the following code:
window.addEventListener('message', (ev) => {
if (ev.data.type === 'MEETING_BOOKED') {
sourcePixel('event', 'customEvent', {
email: ev.data.meeting.attributes.booker_email,
stage: 'Demo Booked'
});
}
});
This will create a contact with the client's email in Source, and trigger a funnel stage called Demo Book.
If you only want to create the contact, and don't want a funnel stage trigger, then you can omit the stage: 'Demo Booked' line.
CRM Events
Source automatically captures contact information from forms on your website, there is no additional configuration needed for tracking.
Social / Google Logins
Users that sign up using a Signup With Google flow are not captured automatically.
Google provide the contact's email address after exchanging the authentication token. You need to pass that email from the website so that it will associate with the cookie.
From your browser code:
sourcePixel('event', 'customEvent', {
email: emailReturnedFromGoogleTokenExchange,
});