GEOfastgeofast_

Integrating the GEOfast Snippet in WordPress

Get your WordPress site ready for AI search

Method 1: The Easy Plugin Method (Recommended)

This method is ideal for all users, from beginners to professionals. We will use a popular and free plugin to safely place the snippet in your website's header.

Step 1: Copy Your GEOfast Snippet

Log in to your GEOfast dashboard and copy your personal JavaScript snippet. It looks like this:

<!-- GEOfast Snippet -->
<script async src="https://geofast.me/widget.js" data-domain="USER-DOMAIN" data-user="USER-ID"></script>
<!-- End GEOfast Snippet -->

Note: Replace USER-DOMAIN and USER-ID with the values shown in your GEOfast dashboard.

Step 2: Install a Plugin

Install and activate the "WPCode – Insert Headers and Footers" plugin (or similar). Then go to Code Snippets > Header & Footer and paste the snippet into the Header box. Save changes.

Method 2: For Advanced Users (Without a Plugin)

If you prefer not to install additional plugins, add the snippet via your child theme's functions.php (only if comfortable editing theme files). Use the provided PHP snippet and replace YOUR-UNIQUE-ID.

Example: functions.php

function geofast_add_script_to_head() {
  ?>
    <!-- GEOfast Snippet -->
    <script async src="https://geofast.me/widget.js" data-domain="USER-DOMAIN" data-user="USER-ID"></script>
    <!-- End GEOfast Snippet -->
  <?php
}
add_action( 'wp_head', 'geofast_add_script_to_head' );

Tip: Using a plugin (recommended) prevents changes from being lost during theme updates. If editing PHP directly, use a child theme and test on a staging site first.

Done! GEOfast is Now Active

Regardless of the method you chose, the GEOfast snippet is now active across your entire WordPress website.

GEOfast Guide: WordPress