Print this page

Defining the _etmc variable for Marketing Cloud Predictive Intelligence collect code

Knowledge Article Number 000231056
If you're having an issue with getting data to populate into Predictive Email or Predictive Web using the Predictive Intelligence collect code, verify that all variables are defined before the collect.js is loaded.

Check that the variables are defined

1. Visit the page that the collect code is hosted on using your Chrome browser.
2. Launch the Chrome developer tools add-on.
3. Search "for _etmc."

If the error returned is a 304 error, and that "_etmc" and is not defined, this means that the _etmc.push action is happening before the collect.js is loaded onto the page.

You can add: 
var _emtc= _etmc || [];
before the push event.  This will define _etmc and allow the call to fire once collect.js finishes loading.

promote demote