Our Marketo tracking feature lets you see — right on Marketo contact timelines — whenever contacts visit your Foleon Docs and how they behave.
Tracking individual contacts' interaction in Marketo allows you to personalize follow-ups, trigger workflows, measure engagement, employ lead scoring, and better understand the value of your content. In this article, we’ll show you how to set up tracking for Foleon Docs in Marketo.
💡 This feature is not included in all plans. If you're interested in this functionality, contact our Customer Success Management team.
In this article
What to do in Marketo
First, you'll need to get your Marketo Munchkin ID.
In Marketo, click on the admin tab in the top navigation bar. Then search for Munchkin in the left menu. Once you’ve opened that tab, look for the Munchkin account ID and copy it.
📖 Marketo tracks visitors using browser cookies. To learn more, we recommend reading Marketo's documentation on this topic.
What to do in Foleon
You'll need to paste this Marketo ID in your Foleon project settings.
Go to Foleon, open the project settings, scroll down to Marketo tracking, and paste in your Marketo Munchkin ID.
Republish your content
Once you’ve checked if your Marketo tracking is set up correctly, you can (re)publish your Foleon Doc(s) and monitor contact timelines.
⚠️ Do you have multiple live Foleon Docs in your project? You'll need to republish each Foleon Doc to activate the Marketo tracking.
Below, you see an example record of a Marketo contact who viewed multiple pages in a Foleon Doc. In this overview, you'll find the following data:
- Date and time (including timezone)
- Activity type
- Detail (page visit URL)
⚠️ If your website's domain differs from that of your Foleon Doc (e.g., www.yourdomain.com and www.yourfoleondomain.com), you'll need to set up one form for each domain to track visitors, and users will have to complete both forms. This is because Marketo cookies are first-party cookies and are domain-specific. When it comes to subdomains, that’s not the case, and all actions will be logged using the same lead record/cookie. For instance: www.yourfoleondomain.com, ebook.yourfoleondomain.com, newsletter.yourfoleondomain.com.
Track time on page
Tracking and analyzing time on page provides insights into how long visitors spend on a specific page before navigating to another page or leaving your Foleon Doc.
This metric offers valuable visitor behavior and engagement information, helping you understand how effectively your content captures and retains your audience's attention.
To track time on page and collect that data in Marketo, you need to implement the script below in the remarketing field. Make sure to republish your Foleon Doc after doing so.
💡Although the remarketing field is easy to use, make sure you know your custom code inside out. If you're not very experienced with coding, we don't recommend using this feature.
<script>
document.addEventListener('DOMContentLoaded', function (event) {
// console.log('document loaded ****');
var currentURL = window.location.href;
if (document.referrer !== 'undefined' || document.referrer !== null) {
var referrerURL = document.referrer;
} else {
referrerURL = '';
}
let startTime = performance.now();
let elapsedTime = 0;
function updateElapsedTime() {
const currentTime = performance.now();
elapsedTime = currentTime - startTime;
}
const timerInterval = setInterval(updateElapsedTime, 1000);
// tracks visibility of the tab change
document.addEventListener('visibilitychange', (event) => {
if (document.visibilityState == 'visible') {
// console.log('Doc tab is active');
clearInterval(timerInterval);
updateElapsedTime();
} else {
// console.log('Doc tab is inactive');
sendMunchkinURLparams(currentURL, referrerURL, elapsedTime, true);
}
});
// tracks leaving the page or closing the browser
window.addEventListener('beforeunload', function () {
// console.log('BEFORE UNLOAD **** ');
// console.log('elapsedTime', elapsedTime);
// console.log('referrerURL', referrerURL);
// console.log('currentURL', currentURL);
clearInterval(timerInterval);
updateElapsedTime();
sendMunchkinURLparams(currentURL, referrerURL, elapsedTime);
});
});
function sendMunchkinURLparams(webURL, refURL, time, isTab) {
// sessionduration in seconds
const sessionduration = time / 1000;
// sessionduration in milliseconds
// const sessionduration = time;
window.Munchkin.munchkinFunction('visitWebPage', {
url: webURL,
params: `sessionduration=${sessionduration}&referrer=${refURL}${isTab ? '&tabvisibilitychange=true' : ''}`,
});
}
</script>
⚠️ The above script does not require any addition or further editing. As long the Marketo munchkin ID is added in the project settings, the script will work.
Use tracking data for lead scoring
Integrating Foleon with Marketo allows you to apply lead scoring based on activity and engagement. You can track which pages your contacts visit and set up lead scoring to assign points based on that engagement with Foleon Docs.
For example, a prospect reads your eBook. You can assign points that contribute to the lead score based on the number of pages they visit. Did they read more than half of your eBook? They should be assigned more points than someone who reads less.
Another example. If you created a proposal, you could assign points if they view important pages in the proposal, such as the page with pricing information. You could even find other contacts who are looking at your proposal to get a better grasp of the buying committee.
Based on this, your sales team can prioritize following up on the most-engaged or active leads.
📖 Learn more about Marketo lead scoring in their guide: The Definitive Guide to Lead Scoring.
Marketo tracking and cookies
Marketo tracks visitors using browser cookies. According to GDPR, you need to inform your readers about these cookies. We enable you to set up a cookie consent pop-up to comply with these regulations.
There are two situations, depending on if you have cookie consent set up:
- When cookie consent has not been set up, Marketo tracking will work automatically, letting Marketo track visitors.
- When cookie consent has been set up, Marketo tracking will only work if the visitor accepts cookies.
To set up your Foleon Docs in compliance with GDPR, you must activate Foleon's cookie consent feature if you use any tracking scripts. Alternatively, you can implement a Consent Management Platform (CMP).