|  Start
Hjälp

WordPress Hjälp

Add Google Analytics to WordPress

You can track your WordPress site in Google analytics by adding the tracking code to the header of your WordPress theme.

Note: You must have a Google Analytics account before you can setup this plugin. If you don't have an account, then you will need to set one up.

  1. Access your Google Analytics account and copy your tracking code snippit.
  2. Access your WordPress files via hosting or FTP. (cPanel / Plesk / Web Hosting / Managed WordPress)
  3. Navigate to the /wp-content/themes folder for your WordPress site.
  4. Open the folder for the theme you are currently using on your site.
  5. Open and edit the header.php file.

    If your theme does not have a file named header.php, then you will need to locate and edit the file that contains the wp_head() code.

  6. Paste your tracking code snippit just before the following code.
    <?php wp_head();
  7. Save and upload the updated file.
  8. Visit your site so that traffic is recorded in your Google Analytics account.
  9. Check your Google Analytics reporting to confirm the file was correctly updated.

More info


Var den här artikeln till hjälp?
Tack för din feedback. Ring vårt supportnummer eller starta chattalternativet ovan om du vill prata med en medarbetare på kundtjänst.
Vi är glada att vi kunde hjälpa till! Finns det något mer vi kan göra för dig?
Det var tråkigt att höra. Berätta vad som var krångligt eller varför lösningen inte hjälpte dig med problemet.