Page cover image

Methods

The following methods are made accessible anywhere on the page, through the 'geoflow' client-side JavaScript object by Geoflow.

Method Name
Method Description

run

The primary initialization function for Geoflow is responsible for calling getData and running the script extensions (if enabled).

getData

Fetches the visitor data properties.

updateData

Use this to override any visitor data property, simulating what different visitors may experience on your website.

displayData

Output the visitor data properties that are currently available.

clearData

Force clear any visitor data properties saved in the browser's session storage. This will not effect the 'geoflow' JS object.

checkCondition

Returns a boolean based on the condition and value passed.

select

Appends one or more <option> elements to a <select> element based on the category passed and an optional placeholder.

Examples

// Clear the Current Visitor Data Properties Saved in Session Storage
geoflow.clearData();

// Change the Current Country Code to US (United States)
geoflow.updateData({ countryCode: 'US' });

// Add All Countries to the <select> with an ID of 'choose-country'
geoflow.select('#choose-country', 'all-countries', 'Choose a Country');

Last updated

Was this helpful?