Capturing On Page Variables

Capturing on-page variables

By default, the the DNI JavaScript snippet collects the following data:

• Landing Page URL
• UTM Parameters
• Referrer URL
• User Agent
• IP Address
• Google Analytics cookie values
• Adobe Analytics cookie values

You can also add a JavaScript variable that will be read by the DNI JavaScript snippet. For example, the following JavaScript sample contains a marchex_dni_management JavaScript variable. This variable contains a JSON object named on_page_variables. Within the on_page_variables object, you can specify key/value pairs that will be captured and associated with phone calls or text conversations attributed to a DNI session:

<script type="text/javascript" src="//" async></script>
<script language="javascript">

var marchex_dni_management = {
    "on_page_variables": {
        "business_number": 12349876,
        "listing_name": "Abc Comapany Inc.",


Google Tag Manage Users

If you are using Google Tag Manager to manage execution of the Marchex DNI Javascript, ensure that the box for support document.write is NOT checked as this may cause issues in capturing/reporting of On Page Variables.