Skip to main content

How to install the Samhub script

Create a website analysis and install the Samhub script on your site, so you can start seeing who's visiting, where they're coming from, and how they behave.

Written by Samhub

Samhub's website analysis goes beyond the basics website metrics like sessions and conversions. It also shows you which audiences are visiting your site, which channels bring in which audiences, and which audiences actually convert. To get started, you'll need to create a website analysis and install our script on your site.

In this guide we'll guide you through the process.

1. Create a new website analysis

Go to the "Analytics" tab and click "+ Create report."

2. Select "Website Report"

You'll see two options. Click "Get started" under "Website Report" to begin the setup.

3. Enter your domain and select market

Type in your domain (for example, samhub.io, without the "www."), then select your market. This can be a country, like Sweden, Norway, or Denmark, or a region within a country, like Västra Götaland, Stockholm, or Skåne. Choose whichever is the best fit for your company. Click "Next" when you're done.

4. Adjust advanced options if needed

If you click "Show advanced options," you can turn off the use of third-party cookies and browser information. We recommend keeping both turned on, since they improve the speed and accuracy of your analysis. Only turn them off if your company has a very strict privacy policy.

Samhub is 100% privacy-safe and GDPR compliant platform, so you don't have to worry about your, or your users data. We are approved by the Swedish government bank.

5. Install the script on your website

Copy and paste the script as close to the opening <head> tag as possible, on every page of your site. How you do this depends on your website's CMS. You can use your CMS's own HTML editor, Google Tag Manager, or a plugin built for adding code. For example, on WordPress, you could use a plugin like "Custom CSS & JS" (available in the WordPress Plugin Marketplace) to add it as custom HTML, give it a name, paste the script in, set it to load in the header, and publish it.

6. Ask a developer for help, if needed

If you'd rather have a developer or another technical person on your team install the script, click "Share" next to the code. Enter their email address, a subject, and a message, then click "Share" again to send them the code along with installation instructions.

7. Staying cookie compliant

Once your script is installed, Samhub sets a couple of cookies to make the analysis work. Make sure to add these to your Cookie Consent Manager so you stay compliant with GDPR.

Well done!

Once you've completed these steps, you'll land on your new website report. It can take anywhere from a few hours to a few days for your data to show up here, depending on how much traffic your website gets.

Did this answer your question?