The https:// in the address bar means your information is encrypted and can not be accessed by anyone else
Only government entities in the U.S. can end in .gov


The City of Philadelphia has a unified web analytics strategy. Every web property should either use the following tracking code for webpages or the JavaScript implementation for applications.

This will allow the City to report on traffic, usage, clicks, and to collect other useful data about websites and applications.

Analytics tracking for content-heavy webpages

  1. Add the first snippet immediately after the opening <head> on your site, on every page.
<!-- Google Tag Manager []  -->
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager [] -->
  1. Add the second no-script snippet immediately after the opening <body> tag, on every page.
<!-- Google Tag Manager no script [] -->
<noscript><iframe src=""
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager no script [] -->
  1. If you are installing analytics on a domain, email with the URL of the website for testing. You will receive confirmation that the site that should be tracked and the code is working.

Analytics for web applications

If you are using a JavaScript framework like Vue.js, the City recommends using vue-gtag. The City’s tracking id is UA-860026-1.

You will need to add vue-gtag to your project and include it in your router.js (if you have one), or directly in the main.js file, where you initialized Vue.

Using VueRouter (preferred)

If you are using VueRouter inside your application, you can pass the VueRouter instance as the third parameter of the Vue.use method and the plugin will start tracking all your routes automatically, meaning you will not need to pass individual routes for tracking.

import Vue from "vue";
import VueRouter from 'vue-router';
import App from "./App.vue";
import VueGtag from "vue-gtag";

const router = new VueRouter({
  routes: [...]

Vue.use(VueGtag, {
  config: { id: "UA-860026-1" },
}, router);

new Vue({
  render: h => h(App)

Manual tracking

If you aren’t using VueRouter, or otherwise need to send routes manually, you can follow the Bootstrap option instructions on the plugin website.

Other analyitcs

You can also add Microsoft Clarity tracking to the <head> of your application. Clarity allows you to see session recordings, heatmaps, and other detailed information on page engagement.

Email to gain access to Microsoft Clarity.

<!-- Microsoft Clarity [] -->
<script type="text/javascript">
    })(window, document, "clarity", "script", "4l8dhsl6kn");
<!-- End Microsoft Clarity [] -->

Note: You should only add Clarity if your application does not collect personal information.