Configuration

Munchkin can accept a variety of configuration settings to customize behavior. Configuration settings are properties of a JavaScript object that is passed as the second parameter when calling Munchkin.init().

The configuration settings object can contain any number of properties from the table below.

Properties

Name Data Type Description
altIds Array Accepts an array of Munchkin ID strings. When enabled, this will duplicate all Web Activity to the targeted subscriptions, based on their Munchkin ID.
asyncOnly Boolean If set to true, will send XMLHttpRequest’s asynchronously. Default false.
clickTime Integer Sets amount of time to block after a click to allow for click tracking request (in milliseconds). Reducing this will reduce accuracy of click-tracking. Default is 350 ms.
cookieAnon Boolean If set to false, will prevent tracking and cookie creation of new anonymous leads. Leads are cookied and tracked after filling out a Marketo form, or by clicking through from a Marketo Email. Default is true.
cookieLifeDays Integer Sets the expiry date of any newly created Munchkin tracking cookies to this many days in the future. Default is 730 days.
customName String Custom page name.  System use only.
disableClickDelay Boolean If set to true, disables click tracking delay entirely. Will reduce accuracy of click tracking. Default false.
domainLevel Integer Sets the number of parts from the page’s domain to use when setting the domain parameter of the cookie.

For example, suppose the current page domain is “www.example.com”.

domainLevel: 2 will set the domain parameter to “.example.com”

domainLevel: 3 will set the cookie to “.www.example.com”

See Additional notes below.

wsInfo String Takes a string to target a workspace. This workspace ID is obtained by selecting the Workspace in the Admin > Integration > Munchkin menu.


domainLevel

Munchkin will automatically manage certain two letter top-level domains.

This defaults to two parts in normal cases where the top-level domain is three letters. For example “www.example.com”, the two rightmost parts will be used to set the cookie, “.example.com”.

For two letter country codes such as “.jp”, “.us”, “.cn”, and “.uk”, the code will default to three parts. For example “www.example.co.jp” will use three rightmost domain parts, “.example.co.jp”.

If the domain pattern requires a different behavior, then this must be specified using the domainLevel parameter.

Examples

Send Activity to Multiple Subscriptions

This example will send all web activity to the instances with Munchkin IDs “AAA-BBB-CCC” and “XXX-YYY-ZZZ”.

Set Tracking to Asynchronous and Disable Click Delay

This example will force all XMLHttpRequest’s to be sent asynchronously from the main thread and disable the click-tracking delay.