Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Latest commit

 

History

History
38 lines (34 loc) · 1.62 KB

README.md

File metadata and controls

38 lines (34 loc) · 1.62 KB

Swetrix to Wix integration

After you sign up on Swetrix and create a new project, the only thing left is to add it to your website. If you're curious what data the tracking script collects, open our documentation and read the API -> trackViews section.

Installation

  1. Log in to your Wix account.
  2. Go to the Settings page on your Wix site dashboard.
  3. Click on the Custom Code tab under Advanced Settings.
  4. Click on Add Custom Code at the top right.
  5. Paste the following Swetrix snippet:
<script src="https://swetrix.org/swetrix.js" defer></script>
  1. Give it a name so that you can easily recognize this snippet later.
  2. Select All pages under "Add Code to Pages" to track all pages on your website. Leave the default option Load once if asked.
  3. Select Head when asked where to place the code snippet.
  4. Click Apply.
  5. Repeat all the steps above, but this time paste the following script:
<script>
  document.addEventListener('DOMContentLoaded', function () {
    swetrix.init('YOUR_PROJECT_ID')
    swetrix.trackViews()
})
</script>

<noscript>
  <img src="https://api.swetrix.com/log/noscript?pid=YOUR_PROJECT_ID" alt="" referrerpolicy="no-referrer-when-downgrade" />
</noscript>
  1. Select Body - end when asked where to place the code snippet.
  2. Click Apply again, and done!

Do not forget to change YOUR_PROJECT_ID to your actual project id!

Check your installation

After installing Swetrix tracking script, go to your website and visit some pages.
Within a minute you should be able to see new pageviews being added to your project's dahsboard.