Browse Source

Move G- tracking setting above UA-. Update tracking docs (#517)

Vince Salvino 2 years ago
parent
commit
92d31a071d
2 changed files with 32 additions and 35 deletions
  1. 3 3
      coderedcms/models/wagtailsettings_models.py
  2. 29 32
      docs/how_to/add_tracking_scripts.rst

+ 3 - 3
coderedcms/models/wagtailsettings_models.py

@@ -311,17 +311,17 @@ class AnalyticsSettings(BaseSetting):
         HelpPanel(
             heading=_("Know your tracking"),
             content=_(
-                "<h3><b>Which tracking IDs do I need?</b></h3>"
+                "<h2>Which tracking IDs do I need?</h2>"
                 "<p>Before adding tracking to your site, "
                 '<a href="https://docs.coderedcorp.com/wagtail-crx/how_to/add_tracking_scripts.html" '  # noqa
-                'target="_blank">read about the difference between UA, G, GTM, '
+                'target="_blank">read about the difference between G, UA, GTM, '
                 "and other tracking IDs</a>.</p>"
             ),
         ),
         MultiFieldPanel(
             [
-                FieldPanel("ga_tracking_id"),
                 FieldPanel("ga_g_tracking_id"),
+                FieldPanel("ga_tracking_id"),
                 FieldPanel("ga_track_button_clicks"),
             ],
             heading=_("Google Analytics"),

+ 29 - 32
docs/how_to/add_tracking_scripts.rst

@@ -1,55 +1,52 @@
 Add Tracking Scripts
 ====================
 
-Tracking scripts, such as like Google Analytics or Facebook Pixels, can be added
-to the ``<head>`` and ``<body>`` of all of your web pages.
+Tracking scripts, such as Google Analytics or Facebook Pixels, can be added to
+the ``<head>`` and ``<body>`` of all of your web pages.
 
 Tracking settings are located in the Wagtail Admin dashboard under
 **Settings > Tracking**.
 
 .. warning::
 
-   While it may be tempting to add dozens of tracking scripts to your website,
-   keep in mind that **each script you add will slow your site down**
-   and will invade your visitors' privacy. Therefore we recommend to carefully
-   evaluate and choose one tracking solution that best fits your needs.
+   Keep in mind that **each script you add will slow your site down** and may
+   affect your data privacy compliance such as GDPR. Therefore we recommend to
+   carefully evaluate and choose one tracking solution that best fits your
+   needs.
 
 
 Google Analytics
 ----------------
 
-There are two types of Google Analytics accounts --- "Universal Analytics"
-(generally for accounts created before 2021) and "Google Analytics 4":
-
-* **Universal Analytics** account IDs begin with **UA-**
+There are two types of Google Analytics accounts --- "Google Analytics 4" (GA4)
+and "Universal Analytics" (for old accounts created before 2021):
 
 * **Google Analytics 4 (GA4)** account IDs begin with **G-**
 
-* If you are using both account types, you can enter both IDs and the data will
-  populate both accounts. However, neither is "better" and using both does not
-  provide any benefit compared to using just one.
-
-.. note::
+* **Universal Analytics** account IDs begin with **UA-**. Google is shutting
+  down UA accounts in July 2023, so it is recommended to use GA4 accounts
+  instead.
 
-   A common misconception is that Google Analytics helps boost SEO. This is not
-   true! Google Analytics tracks people who use your site so you can see
-   metrics such as: how many people viewed which pages, for how long, from what
-   location, etc. It does not provide any benefit other than giving you this
-   information.
+* If you are using both account types, you can enter both IDs and the data will
+  populate both accounts.
 
 
 Google Tag Manager (GTM)
 ------------------------
 
-Google Tag Manager (GTM) is a separate product from Google Analytics. GTM lets
-you add **one** script to your site. Then, from the GTM Console, you can add
-multiple other tracking scripts (Such as Google Analytics, Google Adwords,
-Google Remarketing, Facebook Pixels, Salesforce, Pardot, StatCounter, Adobe,
-etc.). GTM makes it convenient for your marketing staff to continually add and
-change the tracking tools without having to make any changes to the website.
+Google Tag Manager (GTM) lets you add **one** script to your site. Then, from
+the `Google Tag Manager Console <https://tagmanager.google.com/>`_, you can add
+multiple other tracking scripts (Such as Google Analytics, Adwords, Facebook
+Pixels, HubSpot, Salesforce, Pardot, StatCounter, Adobe, etc.). GTM makes it
+convenient for your marketing staff to continually add and change the tracking
+tools without having to make any changes to the website.
+
+.. important::
 
-If you are using Google Tag Manager, we recommend that you remove any other
-tracking scripts from your site, and add them instead through the GTM Console.
+   If you are using Google Tag Manager, you should remove any other tracking
+   scripts from your site (including the **G-** and **UA-** IDs above), and add
+   them through the `Google Tag Manager Console
+   <https://tagmanager.google.com/>`_ instead.
 
 
 Other Scripts
@@ -78,13 +75,13 @@ If you have other tracking codes to add, follow these steps:
 
 .. note::
 
-    You can verify that the scripts on the web page by going to the site and
-    inspecting the Source Code. Then search for the ``<script>`` tags, either
+    You can verify that the scripts are on the web page by going to the site and
+    inspecting the source sode. Then search for the ``<script>`` tags, either
     visually or by hitting ``CTRL + F`` on your keyboard and searching for the
-    code. Here's how to get the Source Code if you are not sure:
+    code. Here's how to view the source code if you are not sure:
 
     * Firefox: https://developer.mozilla.org/en-US/docs/Tools/View_source
 
     * Chrome: https://support.google.com/surveys/answer/6172725?hl=en
 
-    * IE/Edge: https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/resources/
+    * Edge: https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/resources/