Title: Tracking-code
Last modified: November 14, 2021

---

# Tracking-code

 *  Resolved [funmelody](https://wordpress.org/support/users/funmelody/)
 * (@funmelody)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/tracking-code-12/)
 * Hello,
 * I would like to use tracking-code after setup “Tracking Code Position” to “Add
   manually”
 * You wrote that: “_**Copy this to the theme or plugin which should handle displaying
   the snippet.**_”
 * 1. Where will I copy “tracking-code” to the theme?
    2. Where will I copy “tracking-
   code” to the plugin ? Do you mean that is: _**Appearance -> Widget**_ ? 3. Do
   you have a snapshot when the snippet is displayed ?
 * Thanks in advance.
    -  This topic was modified 4 years, 6 months ago by [funmelody](https://wordpress.org/support/users/funmelody/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/tracking-code-12/#post-15074096)
 * Hi!
 * Here are answers to your questions:
 * 1. Usually this’ll be header.php
    2. If you’re using a plugin like Header & Footer
   Scripts, then that’s where you’re supposed to copy it to. And no, I didn’t mean
   a widget. 3. I’m not sure what you mean? You can view your page’s source (just
   prepend `view-source:` to the URL in your browser’s address bar) and you’ll see
   the tracking code somewhere between the `<head>` and `</head>` nodes.
 * Hope it helps!
 *  Thread Starter [funmelody](https://wordpress.org/support/users/funmelody/)
 * (@funmelody)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/tracking-code-12/#post-15074802)
 * Hi Daan,
 * Thanks for your answers.
 * After setup “snippet types” = **Minimal Analytic**, I have copied the tracking
   code to the header.php (theme) before </head> node. The tracking ID is **v4 API**(:
   G-XXXXXXXXX)
 * I started the website but nothing about Analytics shown.
    I expected as the snapshot
   below:
 * [Reports snapshot from Google Analytics](https://i.postimg.cc/B6DHHS2Y/report-snapshot.png)
 * My question no. 3 means how I know the CAOS-plugin works successfully. Will I
   get the report as the snapshot above ?
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/tracking-code-12/#post-15074809)
 * Minimal Analytics doesn’t work with the GAv4 API. So either select another snippet
   type or change to gtag.js (v3) or analytics.js (and make sure to set a V3 tracking
   ID.)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Tracking-code’ is closed to new replies.

 * ![](https://ps.w.org/host-analyticsjs-local/assets/icon-256x256.png?rev=3307068)
 * [CAOS | Host Google Analytics Locally](https://wordpress.org/plugins/host-analyticsjs-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-analyticsjs-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-analyticsjs-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-analyticsjs-local/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/tracking-code-12/#post-15074809)
 * Status: resolved