Documentation menuCourses and communities: Teachable

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.

  1. In the school admin, go to Site, then Code Snippets.
  2. Paste the tag into the Head Code Snippets section. That section applies to all pages and all users.
  3. 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.

SectionWho gets the tagWhen to use it for Loogika
Head Code SnippetsAll users on all pagesThe normal choice
Logged Out SnippetsVisitors who are not logged inWhen the public site is all you want to measure
Logged In SnippetsLogged-in usersLeave 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?

CauseFix
The Site menu has no Code Snippets itemThe 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 lessonThat block only affects one lesson. Move the tag to Code Snippets
Login or checkout pages are missingTeachable serves those pages from sso.teachable.com, where head code snippets do not run