🌎
Geoflow Docs
  • 🌎Welcome to Geoflow
  • 🔍Overview
    • Visitor Data Properties
  • ⭐Features
    • Geo Visibility
      • Define Multiple Conditions
      • Match All Conditions
      • Partially Match Condition
      • Reverse Condition Value
      • Custom Classes
    • Geo Form
      • Autofill Form Fields
      • Auto-Populate Select Fields
    • Geo Text
    • Geo Style
    • Geo Script
    • Script Extensions
      • Performance
      • Marketing Parameters
    • Optional Settings
      • Script Tag Data Attributes
      • Meta Tags
  • ⚙️Advanced
    • Code Snippets
    • Methods
      • run
      • getData
      • updateData
      • displayData
      • clearData
      • checkCondition
      • select
    • Callbacks
    • Events
    • REST API
      • Get Visitor IP
      • Get Visitor Data
      • Add Website
      • Delete Website
      • Update Website
      • List Websites
      • Get Website
  • 📄Legal
    • License Agreement
Powered by GitBook
  1. Advanced

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 1 year ago

Was this helpful?

⚙️
Page cover image