Webflow

Add Besökskollen to your Webflow site via Custom Code.

Difficulty: Easy

Takes about 2 minutes

Step 1: Open Project Settings

  1. 1. Log in to Webflow
  2. 2. Open your project
  3. 3. Click on the gear icon (Project Settings) in the left panel

Step 2: Add Custom Code

  1. 1. Go to the "Custom Code" tab
  2. 2. In the "Head Code" field, paste the script below
  3. 3. Click "Save Changes"
  4. 4. Publish your site to activate tracking
<script defer
  data-site-id="DIN-SAJT-ID"
  data-api="https://besokskollen.se"
  src="https://besokskollen.se/script.js">
</script>

Tip: Per-page tracking

If you only want to track specific pages, you can add the script to the page's "Custom Code" instead of the project's global settings. Click on the gear icon for the page and go to "Custom Code".

Optional: Extended tracking

Add data attributes to enable extra features:

<script defer
  data-site-id="DIN-SAJT-ID"
  data-api="https://besokskollen.se"
  data-outbound-links
  data-file-downloads
  data-forms
  src="https://besokskollen.se/script.js">
</script>
AttributeFunction
data-outbound-linksTrack clicks on external links
data-file-downloadsTrack file downloads (PDF, ZIP, etc.)
data-formsTrack form submissions
data-scroll-depthTrack scroll depth (25%, 50%, 75%, 100%)

Custom Events with Webflow Interactions

You can send custom events when users interact with your site:

<!-- Lägg till i Footer Code för en knapp -->
<script>
document.querySelector('.cta-button').addEventListener('click', function() {
  va('event', 'CTA Click', { location: 'hero' });
});
</script>

Important

Custom Code requires a paid Webflow plan. If you have a free plan, you cannot add external scripts.