🌎
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. Features
  2. Optional Settings

Script Tag Data Attributes

Adjust the default functionality by applying one or more of these data attributes to the <script> tag for Geoflow.

PreviousOptional SettingsNextMeta Tags

Last updated 1 year ago

Was this helpful?

Enable Manual Mode

By default, Geoflow will be initialized automatically—including the visitor data properties being fetched—and the script extensions (if any) will run. To enable manual mode instead, apply the manual data attribute and call when you want Geoflow to run.

The Geo Select feature will not be affected by this, as it doesn't require any visitor data properties.

data-manual=true
<script data-manual="true" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Honouring Do Not Track (DNT) and Global Privacy Control (GPC)

DNT and GPC are two privacy preferences that a user can enable either through their browser or an application/extension. To instruct Geoflow to honour these preferences, apply the privacy data attribute to the <script> tag. The visitor data properties will not be fetched automatically, nor will the script extensions (if any) run unless you manually initialize Geoflow by calling .

data-privacy=true
<script data-privacy="true" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Ignore Visitor Data Properties

Define a comma-separated list of the visitor data properties you would like to have ignored.

The property name is case-sensitive and must match the 'Property Variable' noted in the . The properties added here will be excluded from the 'geoflow' JS object.

data-ignore=propName
<script data-ignore="countryName, countryCode" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Send The Visitor Data Somewhere

Define an endpoint that you would like the visitor data properties sent to when the visitor leaves your website. The endpoint must be a valid secure URL (including the https:// part and a TLD); it can be anything that supports accepting a POST request (e.g. Zapier webhook).

If the URL that you provide is not valid, an error will be displayed in the browser console.

We recommend using our preferred webhook provider, , for your data endpoint.

data-endpoint=URL
<script data-endpoint="https://hook.example.com" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Ignore Canonical

The Current Page URL (currentPage) value in the visitor data properties is set based on the canonical tag on the page, if available. Override this and tell Geoflow to use the current URL.

data-canonical=false
<script data-canonical="false" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Disable Cache

When Geoflow attempts to fetch the visitor data properties, the script will check if they have been cached in the visitor's browser from a previous request in the last four hours. Applying this data attribute will instruct Geoflow always to fetch fresh data.

We recommend only using this data attribute during development on the staging website because disabling the cache will affect your website's performance.

data-cache=false
<script data-cache="false" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Script Extensions

Script extensions allow you to extend the functionality offered by the default Geoflow script without writing a single line of code.

data-extensions=extName
<script data-extensions="performance" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Cloudflare Rocket Loader

If you use Cloudflare's DNS proxy and have Rocket Loader activated, we encourage adding this data attribute to the <script> tag to avoid potential issues.

data-cfasync=false
<script data-cfasync="false" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Turbo (formerly Turbolinks)

If you use Turbo (formerly Turbolinks) on your website, we strongly encourage adding this data attribute to the <script> tag to avoid potential issues.

data-turbo-eval=false
<script data-turbo-eval="false" src="https://cdn.getgeoflow.com/beta/script.min.js" crossorigin="anonymous" fetchpriority="auto"></script>

Learn more about the different .

Learn more about the data attribute in the .

Learn more about the data attribute in the .

geoflow.run()
geoflow.run()
Visitor Data Properties table
Hookdeck
script extensions
Cloudflare Docs
Turbo Docs
⭐
Page cover image