The FunnelEnvy client pushes a number of variables and data objects to the browser window, in particular window.dataLayer. You can use these to read information about visitor, audience, and campaign state.


The following is a list of the most useful variables, how to find them, and what they mean.


In window.dataLayer


FunnelEnvy pushes several event-based objects to the data layer. Each of these will have an event key indicating what action it describes. For example:


backstage.identify

This object is pushed to the data layer each time a visitor is identified by a third party data source, e.g. Marketo. It contains a backstage object with information about the data source and identifier:


backstage.updatedAudiences

This object is pushed to the data layer when a visitor is matched to a FunnelEnvy Audience. It contains a backstage object as well; backstage.audiences will contain details about the audience(s) for which the visitor qualifies:


backstage.updatedAccountData

Similar to updatedAudiences, this object will contain a backstage.accountData object with information on the accounts to which the visitor belongs.


backstage.campaignState

Inspect the backstage.campaignState array within this object for a list of all current FunnelEnvy Campaigns and a breakdown of their status:



Beyond window.dataLayer


window.optimizely.feDone

If you're using the Optimizely integration for Audiences or Campaigns, this variable will be set once FunnelEnvy has finished execution, meaning audiences are evaluated and PRO Campaign bucketing is complete. You can use the truthiness of this variable to activate your Optimizely experiments (see this article).




If you have any questions about FunnelEnvy in the browser, or if you get stuck building a campaign, don't hesitate to reach out! We'd love to hear from you.