To help you track the traffic and performance of your main portal (and your branches), TalentLMS lets you connect your themes to your Google Analytics account.
To generate a tracking code for your portal, follow these steps:
Step 1: Create a Google Analytics property for your portal
1. Sign in to your Google Analytics account.
2. On the left-hand panel, click Admin(1).
3. Here you have two options:
- Create a new account for your TalentLMS property (2).
- Add your new TalentLMS property to an existing account (3).
4. In the respective fields, type the required information.
5. Click Get Tracking ID to get the tracking code.
Note: You can get the tracking ID later from the property settings (Tracking Info > Tracking Code). |
6. From the code area in the Website tracking section, copy the tracking code (4).
Note: The current Google Analytics code does not track your portal’s mobile app. |
7. A Google Analytics snippet looks like this (with your “ID” in place of the “#####”):
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async
src="https://www.googletagmanager.com/gtag/js?id=#####"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '#####');
</script>
Paste your code in a text editor and modify it to look like this:
$.getScript("https://www.googletagmanager.com/gtag/js?id=#####",function(){
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '#####');
});
Copy your new code.
Step 2: Connect your portal to the Google Analytics property
1. Sign in to your TalentLMS account as Administrator and go to Home > Account & Settings > Themes.
2. Make sure you’re editing your active theme and go to the Javascript tab.
3. Paste your modified Google Analytics tracking code into the code area.
Once you have added the Google Analytics tracking code to your portal, it may take up to 24 hours for data (i.e., traffic, referral information, user characteristics, browsing information, etc.) to show up in your reports.
Note: When a branch shares your main theme, that branch is also tracked by the same Google Analytics snippet you’ve added to that theme. For branches with their own active theme, you have to add a separate tracking code to each theme. |