Adding Google Tag Manager Script to Your Refari Website: A Step-by-Step Guide

Created by Ritesh Yadav, Modified on Mon, 16 Sep at 3:03 PM by Ritesh Yadav



Introduction

Integrating Google Tag Manager (GTM) into your WordPress website allows you to efficiently manage tracking codes and marketing analytics without directly editing site code. This guide details how to add GTM to your WordPress site using the Elementor Custom Code feature, streamlining the setup process.

Implementing Google Tag Manager Using Elementor

For Refari clients, integrating Google Tag Manager (GTM) with your website is a streamlined process thanks to Elementor. This approach eliminates the need for manual code edits or navigating through complex configurations. Here’s a step-by-step guide to seamlessly add GTM to your site:

Step 1: Log Into Your WordPress Dashboard

Begin by logging into the WordPress dashboard. This is where you manage your site’s content and settings, including the implementation of custom scripts through Elementor.


Step 2: Access Elementor and Custom Code

Navigate to "Elementor" on your dashboard sidebar.

Locate the "Custom Code" option. This feature allows you to add scripts globally without modifying theme files.


Step 3: Insert the GTM Script in the Header

- Click "Add New" to create a new custom code snippet.

- Name the script for easy reference, such as "GTM - Header."

- Paste the GTM code snippet designated for the <head> section into the provided field.

- Set its location to "<head>" and click "Publish."


Step 4: Add the GTM Script After the Body Tag

- Create another custom code entry by clicking "Add New."

- Label this script, for example, "GTM - Body."

- Insert the GTM code snippet meant for after the opening <body> tag into the text area.

- Choose to place this script "After the opening body tag" and publish your changes.


Step 5: Confirm Your GTM Integration is Correct


- Use GTM's "Preview" mode to check that the tags are firing correctly on your site.

- Alternatively, the Google Tag Assistant Chrome extension can help verify the proper implementation of GTM on your website.


By following these steps, you can easily add Google Tag Manager to your WordPress site using Elementor, bypassing the need for direct code edits. This setup not only simplifies the management of your website's tracking codes but also enhances your ability to collect and analyze data effectively. GTM opens up a world of possibilities for optimizing your site's performance and refining your marketing strategies, all with minimal technical effort.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article