Add the Google tag manager to WordPress and create the first tag.

Do you want to add Google tag manager to word press? Google tag manager provides many benefits for WordPress sites. This helps you add and manage all scripts used by your site. For example, you do not need to manually add code for the following services: Google Analytics event tracking Google optimization manages everything through Google tag manager! Google tag manager will be more convenient if you often add various scripts to the WordPress site. Once you are familiar with it, you can also use it to collect more feasible data to promote marketing campaigns. The
This post will show you step by step how to install Google tag manager on the WordPress website, including where to add code. We will then provide a quick guide on how to publish the first tag and verify that it works. Jump in! Step 1: if you have not registered a Google tag administrator account, you must first register a free Google tag administrator account. Just move here. After registration, you must add a new account in the add new account interface. Specify the company name: ‹ then enter the site name in the container name field in the container settings section and select web. The
If you agree to the Google terms of service, please go from Google to the Google tag manager interface and display two code snippets. In the next section, you need to add both code snippets to the WordPress site, so keep this window open. The second stage: adding Google tag manager code snipt to the website is one of the thorny meanings. Previously, we only needed to add one code snippet in the male part of the topic, but now we want to add two snippets in Google tag manager. The first item is in the male part. The second one is just behind the open male label. In addition to directly editing sub topics, word press does not provide a simple method to insert code after the male tag. The operation methods of each topic are slightly different, so it cannot provide tutorials applicable to all topics. The
So: if you have easily edited the files in the subtopic directly, you can do so. If you don’t like working directly with theme files, we’ll show you two different methods, namely, familiar plug-ins and simplified code methods. Option 1: if you don’t mind using only Google tag manager to use header, twitter and post injection plug-ins, the easiest way to add is to use free head, footer and post injection plug-ins. To start, install and activate this free plug-in. Then, navigate to settings → header and footer on the WordPress dashboard to access the plug-in interface. The
Now: paste the first Google tag manager code snippet into the on every page box in the malepage section investment section. Paste the second Google tag manager code snippet into the descktop* box in the part after the male tag (don’t worry, the code snippet will continue to be loaded during the move. Use head, footer, and post injections. If the move box is selected, a separate code snippet needs to be displayed): All changes can be completed by saving them! The
Option 2:functions. What I want to say is that using PHP code fragments is not technically 100% the best approach. Although it works well on most websites, after showing what should be done, I will explain my meaning. To use it, use this snippet as a function of the subtopic. Just add it to your PHP file. Add\u action (‘wp\u head’,’gtm
_Head\u Code’; Function gtm_head_code() {? >first\u script\u from\gtm\interface malesecond\script\from\gtm\interface maleplaceholder must be replaced with actual code segment. So why is this method not 100% optimal? This method does not place the second code segment on the footer after the male tag. If the visitor does not fully load the page, Tags may not run (rarely, but can). This is why Google recommends adding it as high as possible in the site code. But on most websites? This method is quite good. Step 3: to test whether snipt works and ensure that Google tag manager is installed correctly, perform the following steps: The
Use the free GA Checker tool to enter the URL of the mobile web site. Navigate to the inspection site, click the tag manager tab of the results, and locate the green check box in the tag manager column. If you see it – Congratulations! We have correctly installed the Google tag manager script on the WordPress website. Now, let’s quickly learn how to create the first tag using Google tag manager. Step 4: after adding code snippets to the first tag creation site, you can return to the Google tag manager interface to create the first tag. By default, \
To get started, create a new tag on the Google tag manager dashboard. Click label configuration and select the label type to be generated. Google includes a variety of pre built options, such as Google Analytics, Google optimize, and many third-party services. However, you can also use custom HTML or custom image tags that insert all client-side code: select the maletag type, which should be configured according to the settings. You can then click the triggers section to select when to \
The default is all pages, but you can also click the + icon to specify more targets if desired. When you are finished setting, click save. Step 5: publish container now, to create tags in real time, you need to publish containers. To do this, click the submit button in the Google tag manager interface. Male then enter the version name and version description. It is recommended that you create these projects in as much detail as possible to help with version control in the future. That is, please describe exactly the tags you added and their functions. Then click publish. The
And that’s all! The first label was published. If you want to determine how to test whether a single tag is running, we will provide Chrome with a free browser extension called tag assistant. In the context of helping you become a Google tag management expert, we successfully added Google tag manager to word press. However, the Google tag manager is very functional, and it is beyond the scope of this post to describe a large number of interface options. Now that the Google tag manager is installed, you can learn more about the interface in this Moz article. For more information about some of the tags that Google tag manager can implement, see the posts on Google Analytics and woocomer Google Analytics goals.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *