Courses and communities
Add Loogika to Teachable
You add Loogika to a Teachable school by pasting the script tag into the Head Code Snippets section under Site, then Code Snippets. Every page of your school then carries that code in its head. You need the Builder plan or a higher one to use Code Snippets.
Last updated .
What do you need before you start?
Copy your script tag from Site Settings in Loogika, under the Tracking Script tab. It looks like this, with your own site ID in place of YOUR_SITE_ID:
<script src="https://app.loogika.com/api/script.js?siteId=YOUR_SITE_ID" defer></script>
How do you add Loogika to Teachable?
The tag goes into one section of the school admin.
- In the school admin, go to Site, then Code Snippets.
- Paste the tag into the Head Code Snippets section. That section applies to all pages and all users.
- Click Save.
Which Teachable snippet section should you use?
Use Head Code Snippets when you want to measure both students and visitors who are not logged in. Teachable has two more sections that limit code to one audience.
| Section | Who gets the tag | When to use it for Loogika |
|---|---|---|
| Head Code Snippets | All users on all pages | The normal choice |
| Logged Out Snippets | Visitors who are not logged in | When the public site is all you want to measure |
| Logged In Snippets | Logged-in users | Leave it empty |
Put the tag in one section only, so the same page never carries it twice.
Which Teachable pages does the tag not cover?
Login and checkout pages are outside the reach of head code snippets, because Teachable serves them from sso.teachable.com. Every page on your school domain is covered, and that includes the course area.
How do you check that Loogika is installed?
Visit your school in another browser tab and open a few pages. The pageviews show up in the Loogika dashboard within a few seconds.
If nothing arrives, check whether the page source contains script.js?siteId=. Then compare your setup with the list below.
Why does Teachable not send data to Loogika?
| Cause | Fix |
|---|---|
| The Site menu has no Code Snippets item | The school is on a plan below Builder, and such plans do not allow custom scripts |
| The tag sits in a Custom HTML block in a lesson | That block only affects one lesson. Move the tag to Code Snippets |
| Login or checkout pages are missing | Teachable serves those pages from sso.teachable.com, where head code snippets do not run |