Munchkin 160 Beta and Beacon API

January 8, 2021 | by

Jan 14th 2021: Scheduled rollout update to begin Feb 2nd, instead of Jan 19th as previously stated

Beginning with version 160 of the Munchkin JavaScript, the Beacon API will become the default way that Munchkin communicates with the Marketo backend.  This became available as an option in Summer 2020 with the release of version 159 via the useBeaconAPI configuration parameter.  The Beacon API has several advantages over using the old XMLHttpRequest method, but the principal improvement is that it is a non-blocking asynchronous API for HTTP communication which is available for use in all modern internet browsers.  While most users of Munchkin will not notice a change in website behavior, this update will prevent Munchkin from blocking navigation while waiting to submit a click event to the backend, or more simply, this all but eliminates the possibility of Munchkin causing a browser to “hang” after clicking a link to a new page.  This has been a rare but frustrating occurrence for some Marketo customers. 

This version is slated to rollout to 10% of customers which have enabled the Munchkin Beta Treasure Chest feature on February 2nd 2021, followed by 50% on February 16th, and 100% March 2nd.  A generally available release is not yet scheduled. 

While no problems related to this change are anticipated, and none have been identified while testing, it is impossible for Marketo to test all possible deployment configurations of Munchkin and you may wish to test these changes beforehand or forego this change until general availability of this version.  Instructions for various scenarios are presented below. 

Test Beacon API 

If you wish to test the updated Beacon API in anticipation of the upcoming version, you can do so, by adding the useBeaconAPI parameter to your Munchkin configuration on an external test page.  This test will work with either the generally available or beta version of Munchkin. The configuration paraemeter is shown below in the second argument of the invocation of the Munchkin.init() method on line 7:  

{ ‘useBeaconAPI’: true}

 

Disable Munchkin Beta on Marketo Landing Pages 

To disable Munchkin Beta on Marketo landing pages, you will need to access your Treasure Chest menu in the Admin section of your subscription and change the Munchkin Beta on Landing Pages setting to disabled. 

Disable Munchkin Beta on External Pages 

If you have deployed the Beta version of Munchkin JavaScript to external web pages, and wish to forego this change until it is generally available, you will need to alter your Munchkin JS snippet to target the munchkin.js file instead of the munchkin-beta.js file.  In the example below, this is the value of the s.src variable on line 13.  Your snippet may not closely resemble the example, or may be deployed by a tag manager on your external pages and you may need to reach out to your IT resources or whomever manages your websites with Munchkin tracking enabled.