Skip to main content

Marketo tracking code and custom events

Using the Marketo tracking code and custom events to centralize contact engagement data

You can enable Marketo's custom JavaScript tracking code, called Munchkin, to your Turtl Doc(s) to send activity, e.g. page visits and clicked links, to Marketo when a contact interacts with a Turtl Doc. You can also choose custom events to send, such as read time, form submissions and link clicks.

The Munchkin code tracks all individuals who visit your Turtl Docs so you can react to their visits with automated marketing campaigns. Even anonymous visitors are tracked along with their IP addresses and other information. Once the visitor is identified, it becomes a person in Marketo, and the history associated with the browser cookie is merged in.

How to enable the tracking code

To enable the tracking code, please follow the steps below:

1. Access the Integrations Hub

To access the Integrations Hub, click on "Integrate" on the left-hand menu.

The Integrations screen will show all available integrations in a grid layout.

2. Enable the tracking code

Note: If you haven't connected Marketo to Turtl yet, follow the steps in Configuring your Marketo REST integration first.

Click on "Marketo" and go to the "Settings" tab. Click on "Reader Intent Data" to expand the section.

Toggle on "Enable Marketo Tracking code" to enable the tracking code for all Docs. This identifies known contacts and links their activity to the matching Marketo record.


What events does the tracking code collect by default?

  • "Visit Web Page" activities are sent to Marketo when a contact views a new webpage, in this case, a new page in a Turtl Doc. The activity contains information such as the Referrer URL, Webpage URL, and more.

  • "Clicked Link on Web Page" activities are sent to Marketo when a contact clicks a link on a webpage. This includes http/s, tel, and mailto links. Within Turtl Docs, this activity is generated for any internal or external link clicks, a click on the "Read on" button from a Title page, any external sharing links on the Doc or a widget, PDF downloads, and more.

"Visit Web Page" and "Clicked Link on Web Page" activities are collected for both known and anonymous visitors within Marketo.

Please refer to the Munchkin behavior section to learn more.


How do these events appear in Marketo?

1. On the Activity Log of a known visitor record

If a visitor is known to Marketo, the "Visit Web Page" and "Clicked Link on Web Page" activities appear within the Activity Log of the corresponding record in Marketo. When you click on each activity, you can see additional information about the activity. This information can be referenced and filtered within Smart Lists, Reports, and more, e.g. you might want to create a Smart List of anyone who's visited a certain page of a Turtl Doc.

Web activity is also captured for anonymous visitors. If they become known in Marketo later down the line (e.g. via a Marketo form fill or other method), a known visitor record is created and all historical web activity is associated to the new record.

Example Activity Log on a known visitor's record

Example "Visit Web Page" Activity on a known visitor's record

2. Web page activity in Reports

"Visit Web Page" and "Clicked Link on Web Page" activities can also be reported on within a Web Page Activity Report in Marketo. The report can be customized to show page activity for known or anonymous visitors.


How to send custom events to Marketo

Note: This feature is available on our Grow AI and Scale AI plans. Please contact support if you want to upgrade your plan.

In the Integrations Hub, click on "Marketo", then go to the "Settings" tab and open the "Reader Intent Data" section.

Under "Custom events", events are grouped into five categories: Read time, Content interactions, Asset interactions, Data submission and Social sharing. Expand a category and select the events you want to send, or select "Select & create events for all" to enable every event in that category. It's a good idea to keep this as light as possible so you're not overloaded with information.

Each category shows how many of its events are enabled, e.g. (2/8) enabled. Once selected, you'll see the following confirmation:

Turtl then sends each selected event to Marketo. You don't need to set anything up in Marketo for the events to appear on your contacts.

Notes:

  • If our team previously set up custom events for you with a snippet, you'll see a notice under "Custom events" instead. Please contact our support team before you select any events. The snippet needs to be removed first, and the event names may differ from your current setup.

  • Please contact our support team to share your ideas if you want to track something else.

Tip: In the same "Reader Intent Data" section, you can also send each contact's Turtl engagement score and top topics to Marketo contact properties. Find out more in Syncing Turtl Intent Data With Your CRM.

Custom events list

Below are the custom events you can send, grouped as they appear in the "Custom events" section, with the value added to the activity URL and any event-specific query parameters:

Notes:

  • Every event includes the Event, Content, Chapter, URL, Content URL and Workspace query parameters.

  • Published PDFs send Read time, Content page turn, Link click and Download the PDF version events. For these, Chapter shows the PDF's file name. Asset interactions and Poll submission only come from Turtl Docs.

Category

Event name in Marketo

Value in the URL

Additional query parameters

Read time

Read time 30 seconds

Read time 1 minute

Read time 2 minutes

Read time 3 minutes

Read time 4 minutes

Read time 5 minutes

Read time 8 minutes

Read time 10 minutes

read_time_30_seconds

read_time_1_minute

read_time_2_minutes

read_time_3_minutes

read_time_4_minutes

read_time_5_minutes

read_time_8_minutes

read_time_10_minutes

None

Content interactions

Chapter page turn

Contents menu click

Download the PDF version

Enter chapter

Leave chapter

Logo click

Open fullscreen

Content page turn ("Page turn" in Turtl)

chapter_page_turn

contents_menu_click

download_pdf_version

enter_chapter

leave_chapter

logo_click

open_fullscreen

content_page_turn

None

Asset interactions

Link click

Listen to audio

View chart

View image

View map

View Matterport tour

View PDF

Watch video

link_click

listen_to_audio

view_chart

view_image

view_map

view_matterport_tour

view_pdf

watch_video

Label, Destination

Label, Source

Label, Source

Label, Source

Label, Source

Label, Source

Label, Source

Label, Source

Data submission

Lead capture form submission

Personalization form submission

Poll submission

lead_capture_form_submission

personalization_form_submission

poll_submission

None

None

Poll Question, Poll Response

Social sharing

Share button click - Email

Share button click - Facebook

Share button click - LinkedIn

Share button click - X (Twitter)

Share button click - Xing

share_button_click_email

share_button_click_facebook

share_button_click_linkedin

share_button_click_x

share_button_click_xing

Share button location

Query parameter definitions

  • Event: Name of the custom event.

  • Content: Title of the Turtl Doc.

  • Chapter: Heading of the current chapter.

  • URL: URL of the page in the Turtl Doc.

  • Content URL: URL of the Turtl Doc.

  • Workspace: Workspace the Turtl Doc is in.

  • Label: Label of the link, button or widget.

  • Destination: URL the link or button points to.

  • Source: Source URL of the widget.

  • Poll Question: Title of the poll.

  • Poll Response: Reader's response to the poll.

  • Share button location: Where in the Turtl Doc the share button was clicked: Toolbar, Backcover or Immerse.


How do these custom events appear in Marketo?

You can create a test Doc and trigger the custom events you have enabled.

The custom events come through as "Visit Web Page" activities within Marketo. The event and its details are added to the Query Parameters of the Activity Details, in this format:

Event: Event name | Content: Doc name | Chapter: Chapter title | URL: Page URL | Content URL: Doc URL | Workspace: Workspace name

Event-specific parameters, such as Label and Source, are added at the end. The activity's Webpage URL also ends in ?event= followed by the event's value from the table above, for example ?event=view_chart.

Example of a custom event with additional content in the Query Parameters

The information within the Query Parameters can be used to create Smart Lists and Reports within Marketo to drill down into contacts who have taken certain actions.

Example of a custom event being used to create a Smart List

Did this answer your question?