Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Puchar WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Jak zainstalować Google Analytics w WordPress dla początkujących

Zrozumienie, w jaki sposób odwiedzający wchodzą w interakcję z twoją treścią, jest kluczem do osiągnięcia twoich celów jako właściciela witryny internetowej. Niezależnie od tego, czy twoim celem jest zdobycie lojalnych czytelników, zwiększenie sprzedaży, czy też zdobycie pozycji autorytetu w swojej niszy, posiadanie dostępu do danych o ruchu na witrynie internetowej jest bardzo ważne.

Tutaj z pomocą przychodzi Google Analytics. Jest to darmowe i potężne narzędzie od Google, które zapewnia wgląd w zachowanie twoich odbiorców. Pozwala to na podejmowanie decyzji opartych na danych w celu ulepszenia Twojej witryny internetowej i strategii dotyczącej treści.

W ciągu naszego ponad 16-letniego doświadczenia wierzymy, że Google Analytics pozostaje najlepszym sposobem na poznanie twojej publiczności. Pomogliśmy również wielu użytkownikom zainstalować i rozpocząć korzystanie z Google Analytics na ich witrynach WordPress.

W tym artykule podzielimy się tym, dlaczego Google Analytics jest importowane i jak można łatwo zainstalować Google Analytics w WordPress (krok po kroku).

How to Install Google Analytics in WordPress

Najpierw wyjaśnimy, dlaczego Google Analytics jest ważne i jak może pomóc w rozwoju twojej witryny internetowej.

Następnie pokażemy, jak założyć konto Google Analytics i jak zainstalować je na twojej witrynie WordPress.

Na koniec wyjaśnimy, jak zobaczyć twoje raporty ruchu w Google Analytics.

Oto krótki przegląd tego, czego dowiesz się z tego artykułu:

Gotowy? Zaczynamy!

Dlaczego Google Analytics jest ważne dla blogerów?

Po założeniu bloga Twoim celem nr 1 jest zwiększenie ruchu i liczby subskrybentów. Google Analytics pomaga podejmować decyzje oparte na danych, pokazując statystyki, które mają znaczenie. Możesz zobaczyć:

Kto przechodzi na twoją witrynę internetową?

Ta część analityki pokazuje położenie geograficzne twoich odbiorców, jakiej przeglądarki użył użytkownik, aby przejść na twoją witrynę, a także inne ważne informacje, takie jak rozdzielczość ekranu, obsługa JavaScript, pomoc techniczna Flash, język i inne.

Dane te są niezwykle przydatne i mogą pomóc na wiele sposobów. Tworząc własny projekt witryny internetowej, możesz wykorzystać dane użytkowników, aby upewnić się, że twoja witryna będzie zgodna z odbiorcami.

Jeśli większość twoich użytkowników nie ma pomocy technicznej Flash, to powinieneś unikać dodawania elementu Flash do twojej witryny. Jeśli większość twoich użytkowników korzysta z rozdzielczości ekranu 1280, upewnij się, że twój projekt jest zgodny [może być też „kompatybilny”] z tą rozdzielczością lub mniejszą.

Co robią ludzie, gdy znajdują się na twojej witrynie internetowej?

Możesz śledzić, gdzie użytkownicy przechodzą na twoją witrynę internetową, jak długo na niej pozostają oraz współczynnik odrzuceń (odsetek użytkowników, którzy opuszczają witrynę przy pierwszej wizycie).

Korzystanie z tych informacji może zmniejszyć współczynnik odrzuceń i zwiększyć twoją liczbę odsłon.

Możesz również znaleźć swoje najpopularniejsze artykuły, artykuły, które nie radzą sobie tak dobrze, a także rodzaj treści, których szukają Twoi użytkownicy.

Kiedy ludzie przechodzą na twoją witrynę internetową?

Patrząc na najgorętsze godziny w ciągu dnia dla Twojej witryny, możesz wybrać najlepszy czas na opublikowanie wpisu. Jeśli ta strefa czasowa nie jest zgodna [może być też „kompatybilna”] z twoją, możesz zaplanować wpis na tę godzinę.

Jak ludzie znajdują twoją witrynę internetową?

Ta sekcja analityki pokazuje, skąd pochodzą użytkownicy. Na przykład, czy korzystają oni z wyszukiwarek, wpiszą bezpośrednie odnośniki lub klikną na linki polecające z innej witryny?

Pokazuje również, jaki procent Twoich odwiedzających pochodzi z każdego z tych źródeł. Google Analytics podaje podział każdej z tych kategorii. Jeśli jest to kategoria wyszukiwarek, to pokazuje, z której wyszukiwarki pochodzi najwięcej ruchu, np. Google, Yahoo, Bing itd.

Podział źródeł poleceń pokazuje, z którymi witrynami należy pracować najczęściej. Jeśli Twoim głównym źródłem poleceń jest Facebook, potrzebujesz ekskluzywnej treści na Facebooku, aby Twoi odbiorcy poczuli się wyjątkowo.

Jeśli twoim głównym źródłem poleceń jest zewnętrzna witryna internetowa, możesz rozważyć nawiązanie z nią współpracy( wymianawpisów gościnnych lub coś innego).

W jaki sposób ludzie wchodzą w interakcję z twoją treścią?

Google Analytics pokazuje, w jaki sposób użytkownicy wchodzą w interakcję z treścią Twojej witryny. Pokazuje, jaki procent użytkowników kliknął w który odnośnik na twojej witrynie i wiele więcej.

Możesz przeprowadzić testy podziału A/B, tworząc eksperymenty z treścią w Google Analytics, aby zrozumieć, co działa najlepiej, aby osiągnąć twoje cele.

Widząc interaktywność użytkowników, możesz pracować nad twoją treścią wokół użytkowników. Widząc odpowiedzi na powyższe pytania, możesz skupić się na strategiach, które działają dla twojej witryny i unikać metod, które nie działają.

Mówiąc najprościej, wyeliminuj zgadywanie i skup się na statystykach, które mają znaczenie, abyś mógł podejmować decyzje oparte na danych.

Film instruktażowy

Subscribe to WPBeginner

Jeśli wolisz pisemne instrukcje, czytaj dalej.

Jak zarejestrować się w Google Analytics

Google Analytics jest dostępny za darmo, a do rejestracji wystarczy konto Google lub Gmail. Proces rejestracji jest dość prosty. Wystarczy postępować zgodnie z poniższymi instrukcjami krok po kroku, aby utworzyć twoje konto Google Analytics.

Krok 1: Najpierw należy przejść na witrynę internetową Google Analytics, aby się zarejestrować. Po wejściu na witrynę internetową wystarczy kliknąć przycisk „Rozpocznij już dziś”.

Click get started today

Następnie zostaniesz poproszony o logowanie się za pomocą twojego konta Google.

Jeśli masz już konto Google lub Gmail, możesz użyć go do zalogowania się. W przeciwnym razie możesz utworzyć konto Google dla siebie.

Sign in using your Google account

Krok 2: Po zalogowaniu się na twoje konto Gmail zobaczysz ekran powitalny, taki jak ten poniżej.

Tutaj zarejestrujesz się w Google Analytics za pomocą twojego konta Gmail. Kliknij przycisk „Rozpocznij pomiar”.

Click start measuring button

Następnie zostaniesz poproszony o podanie nazwy konta.

Ta nazwa będzie używana wewnętrznie, więc możesz użyć czegokolwiek, na przykład nazwy twojej firmy.

Enter your Google account name

Google Analytics pokaże również ustawienia udostępniania danych z wielu kont.

Te ustawienia dają ci kontrolę nad udostępnianiem twoich danych Google Analytics. Możesz zachować ustawienia domyślne i przejść do następnego kroku.

Account data sharing settings

Krok 3: Na następnym ekranie należy utworzyć właściwość Google Analytics.

Google wprowadziło nową wersję Analytics o nazwie Google Analytics 4 lub GA4. Jest to najnowsza wersja, która śledzi twoją witrynę internetową i aplikacje mobilne na tym samym koncie. Ponadto otrzymujesz nowe funkcje, wskaźniki i inny interfejs dla twoich raportów.

Wpisz nazwę nieruchomości i wybierz strefę czasową oraz walutę raportowania. Następnie kliknij przycisk „Dalej”.

Enter property name

Na następnym ekranie musisz wybrać „Kategorię branżową” z rozwijanego menu dla twojej witryny internetowej i wybrać „Rozmiar firmy” z podanych opcji.

Po zakończeniu kliknij przycisk „Dalej”.

Enter business details

Następnie musisz wybrać cele biznesowe i sposób, w jaki zamierzasz korzystać z Google Analytics w swojej firmie. Pomoże to uzyskać spersonalizowane raporty dla twojego biznesu.

Istnieją na przykład takie opcje jak generowanie leadów, napędzanie sprzedaży online, zwiększanie świadomości marki, badanie zachowań użytkowników i wiele innych.

Możesz wybrać wiele opcji lub wszystkie podane opcje, które spełniają Twoje potrzeby. Zalecamy wybranie opcji „Pobierz raporty podstawowe”, aby na Twoim koncie pojawiły się wszystkie raporty Google Analytics.

Choose your business objectives

Po zakończeniu kliknij przycisk „Utwórz”.

Krok 4: Teraz zostaną wyświetlone twoje opcje strumienia Google Analytics Webs.

Ponieważ konfigurujemy Google Analytics dla witryny WordPress, wybierz „Web” jako platformę.

Select data collection option

Następnie wpisz adres URL swojej witryny internetowej i nazwę strumienia.

Domyślnie w Google Analytics włączona jest opcja „Rozszerzone pomiary”. Umożliwia to śledzenie odsłon, przewijania, kliknięć wychodzących, pobierania plików i innych w Google Analytics.

Uwaga: Jeśli planujesz korzystać z wtyczki MonsterInsights, powinieneś wyłączyć opcję „Rozszerzony pomiar”. W przeciwnym razie wtyczka będzie zbierać i wyświetlać podwójną ilość danych.

Następnie możesz kliknąć przycisk „Utwórz strumień”.

Enter website URL and stream name

Możesz teraz zobaczyć swoją nazwę strumienia, adres URL, identyfikator i identyfikator pomiaru.

Wyświetli również różne rozszerzone pomiary, które zarejestruje.

View stream ID and measurement ID

U góry zobaczysz również pasek powiadomień, który pokaże Ci, jak dodać Google Analytics do Twojej witryny WordPress.

Kliknij przycisk „Zobacz instrukcje tagów”. Powinieneś teraz zobaczyć różne sposoby dodawania kodu śledzenia Google Analytics do twojej witryny internetowej WordPress.

View Analytics installation instructions

Następnie można przejść do karty „Zainstaluj ręcznie”.

Następnie zobaczysz kod śledzenia Google Analytics.

Install GA code manually

Śmiało i skopiuj ten kod śledzenia, ponieważ będziesz musiał wpisz go na swojej witrynie WordPress w zależności od metody, której użyjesz poniżej. Możesz również po prostu zostawić tę kartę przeglądarki otwartą i przełączyć się z powrotem, aby skopiować kod w razie potrzeby.

Sugerujemy pozostawienie otwartej karty przeglądarki Analytics, ponieważ może być konieczne ponowne jej odwiedzenie po zainstalowaniu kodu na twojej witrynie WordPress.

Teraz, po skonfigurowaniu konta Google Analytics, przyjrzyjmy się, jak zainstalować Google Analytics w WordPress.

Jak zainstalować Google Analytics w WordPress?

Istnieje kilka różnych sposobów konfiguracji Google Analytics w WordPress. Pokażemy Ci trzy metody, z których pierwsza jest najłatwiejsza, a ostatnia najtrudniejsza.

Możesz wybrać ten, który najlepiej odpowiada Twoim potrzebom.

Uwaga: Aby uniknąć podwójnego śledzenia odsłon na Twoim koncie Google Analytics, musisz używać tylko jednej z tych metod na Twojej witrynie internetowej.

Metoda 1: Google Analytics for WordPress by MonsterInsights

MonsterInsights to najpopularniejsza wtyczka Google Analytics dla WordPress. Korzysta z niej ponad 3 miliony witryn internetowych, w tym Bloomberg, PlayStation, Zillow, WPBeginner i inne.

Jest to najłatwiejszy i zdecydowanie najlepszy sposób na dodanie Google Analytics do WordPressa (zarówno dla wszystkich użytkowników, początkujących, jak i ekspertów). MonsterInsights jest dostępny zarówno jako płatna wtyczka premium, jak i darmowa wersja. W tym poradniku będziemy korzystać z darmowej wersji MonsterInsights.

Możesz skorzystać z wersji MonsterInsights Pro, jeśli potrzebujesz bardziej zaawansowanych funkcji, takich jak śledzenie e-handlu, śledzenie reklam, śledzenie autorów itp. Proces ich konfiguracji jest taki sam.

Więcej informacji można znaleźć w naszej pełnej recenzji MonsterInsights.

Zaczynajmy.

Pierwszą rzeczą, którą musisz zrobić, to zainstalować i włączyć wtyczkę MonsterInsights. Aby uzyskać więcej informacji, zobacz nasz przewodnik krok po kroku, jak zainstalować wtyczkę WordPress.

Po włączaniu wtyczka doda nowy element menu o nazwie „Insights” do twojego menu administratora WordPress, a zobaczysz ekran powitalny. Kliknij przycisk „Uruchom kreatora”.

Launch setup wizard

Kliknięcie go spowoduje otwarcie kreatora konfiguracji MonsterInsights.

Najpierw zostaniesz poproszony o wybranie kategorii dla twojej witryny internetowej (witryna biznesowa, blog lub sklep internetowy). Wybierz jedną z nich, a następnie kliknij przycisk „Zapisz i kontynuuj”.

Choose what describe your website

Następnie należy połączyć MonsterInsights z twoją witryną internetową WordPress.

Wystarczy kliknąć przycisk „Połącz MonsterInsights”.

Connect MonsterInsights with your site

Spowoduje to przejście do kont Google, gdzie zostaniesz poproszony o zalogowanie się lub wybranie konta Google, jeśli jesteś już zalogowany.

Przejdź dalej i wybierz swoje konto Google lub wpisz swój e-mail, aby się zalogować.

Choose Google account to sign in

Następnie zostaniesz poproszony o zezwolenie MonsterInsights na dostęp do Twojego konta Google Analytics.

Kliknij przycisk „Zezwól”, aby kontynuować.

Allow access to your Google account

Następnym krokiem do ukończenia połączenia jest wybranie profilu, który chcesz śledzić.

W tym miejscu należy wybrać twoją witrynę internetową, a następnie kliknąć przycisk „Zakończ połączenie”, aby kontynuować.

Connect analytics with your site

Następnie wystarczy kliknąć przycisk „Zakończ połączenie”, aby kontynuować. MonsterInsights zainstaluje teraz Google Analytics na Twojej witrynie internetowej.

Następnie zostaniesz poproszony o wybranie zalecanych ustawień dla twojej witryny internetowej.

Recommended settings

Domyślne ustawienia będą działać dla większości witryn internetowych. Jeśli korzystasz z wtyczki linków partnerskich, musisz dodać ścieżkę, której używasz do maskowania odnośników partnerskich. Umożliwi to śledzenie twoich odnośników afiliacyjnych w Google Analytics.

MonsterInsights zapyta również, kto może zobaczyć raporty. Możesz wybrać różne role użytkowników WordPress.

Po zakończeniu kliknij przycisk „Zapisz i kontynuuj”, aby zapisać twoje ustawienia.

Who can see the reports

Następnie MonsterInsights wyświetli listę funkcji śledzenia witryny internetowej, które chcesz włączyć.

Możesz przewinąć w dół i kliknąć przycisk „Kontynuuj” lub opcję „Pomiń na razie”.

Choose which tracking features to enable

Na następnym ekranie MonsterInsights pokaże, że pomyślnie skonfigurowałeś śledzenie Google Analytics.

Możesz zobaczyć, że Google Analytics jest podłączony, kod śledzenia jest zainstalowany, a dane są teraz zbierane.

Tracking should be all setup

Następnie można przewinąć w dół i zobaczyć pole, w którym należy wpisz klucz licencyjny.

Na razie kliknij opcję „Zakończ konfigurację bez aktualizacji”.

Continue setup without upgrading

Udało Ci się dodać Google Analytics do Twojej witryny internetowej WordPress.

Wyłącz Rozszerzone pomiary w Google Analytics

Teraz, jeśli utworzyłeś strumień danych w GA4 na własną rękę, zamiast pozwolić MonsterInsights go utworzyć, musisz wyłączyć Enhanced Measurement.

Dzieje się tak dlatego, że MonsterInsights dodaje wiele własnych, ulepszonych funkcji śledzenia. Pozostawienie włączonej opcji Enhanced Measurement wypaczy twoje dane i pokaże nieprawidłowe wyniki.

Najpierw możesz przejść do karty lub okna Google Analytics w twojej przeglądarce. Następnie kliknij opcję „Ustawienia administratora” w lewym dolnym rogu.

Switch to admin view in Google Analytics

Gdy znajdziesz się na stronie „Admin”, zobaczysz różne ustawienia.

Wystarczy kliknąć opcję „Strumienie danych”.

Go to admin and data stream settings

Następnie zobaczysz swoje strumienie danych.

Wystarczy wybrać strumień danych połączony z MonsterInsights.

Select your data stream

Na następnym ekranie należy wyłączyć opcję „Rozszerzony pomiar”.

Aby to zrobić, wystarczy kliknąć przełącznik.

Disable enhanced measurement

Następnie otworzy się wyskakujące okienko potwierdzające, że chcesz wyłączyć rozszerzony pomiar.

Kliknij przycisk „Wyłącz”.

Click turn off button for enhanced measurement

Zmiana ustawień przechowywania danych w Google Analytics

Domyślnie Google Analytics ustawia okres przechowywania danych na 2 miesiące. Możesz to jednak zmienić, aby móc wykorzystywać twoje dane w raportach niestandardowych przez okres dłuższy niż 2 miesiące.

Najpierw należy przejść do Admin ” Ustawienia danych ” Przechowywanie danych w Google Analytics.

Open data retention settings

Następnie możesz kliknąć menu rozwijane „Przechowywanie danych zdarzeń”.

W tym miejscu wystarczy wybrać opcję „14 miesięcy” i kliknąć przycisk „Zapisz”.

Change data retention settings

Pamiętaj, że Google Analytics potrzebuje trochę czasu, zanim wyświetli twoje statystyki.

Zobacz raporty Google Analytics w kokpicie WordPressa

Najlepszą rzeczą w MonsterInsights jest to, że możesz zobaczyć swoje raporty Google Analytics w kokpicie WordPress.

Wystarczy przejść na stronę Insights ” Reports, aby sprawdzić szybki przegląd twoich danych analitycznych.

Dashboard reports

Możesz również dodawać adnotacje bezpośrednio do raportów MonsterInsights, aby rejestrować kluczowe zmiany wprowadzone w Twojej witrynie internetowej.

Na przykład, możesz dodać notatkę, gdy opublikujesz nowy wpis na blogu, utworzysz nową stronę docelową itd. Ułatwia to śledzenie wpływu tych wydarzeń na twój ruch.

View your site notes under the report

Więcej szczegółów można znaleźć w tym przewodniku na temat uzyskiwania adnotacji witryny GA4 w WordPress.

Dzięki nowej funkcji Conversations AI możesz nawet po prostu zapytać MonsterInsights o interesujące Cię statystyki witryny internetowej.

Na przykład, jeśli masz witrynę internetową e-handel, możesz zapytać, ile przychodów uzyskałeś z produktu w określonym czasie.

Use Conversations AI to ask your analytics questions

Jest to znacznie łatwiejsze niż przeszukiwanie twoich raportów w celu znalezienia potrzebnych danych, zwłaszcza jeśli dopiero zaczynasz pracę z analityką.

Ponadto MonsterInsights zawiera dodatek Popularne wpisy, który umożliwia wyświetlanie Twoich treści o najwyższej skuteczności w celu zwiększenia ruchu i liczby odsłon.

MonsterInsights Popular Posts Widget

Możesz go użyć do automatycznego dodawania odnośników do popularnych wpisów, aby zwiększyć zaangażowanie.

Jeśli prowadzisz sklep internetowy, może on również automatycznie dodawać Twoje najskuteczniejsze produkty na końcu każdego wpisu na blogu, aby zwiększyć sprzedaż:

MonsterInsights popular products

Uwaga: MonsterInsights był wcześniej znany jako Google Analytics for WordPress by Yoast. Założyciel WPBeginner, Syed Balkhi, nabył wtyczkę w 2016 roku i przemianował ją na MonsterInsights. Teraz jest ona częścią naszej rodziny wtyczek premium do WordPressa.

Metoda 2: Zainstaluj Google Analytics w WordPressie za pomocą WPCode

Ta metoda nie jest tak dobra jak MonsterInsights, ponieważ nie będziesz w stanie wykonać zaawansowanej konfiguracji śledzenia i nie będziesz w stanie zobaczyć danych Google Analytics w twoim kokpicie WordPress.

Najpierw musisz skopiować twój kod śledzenia Google Analytics (globalny tag witryny), który skopiowałeś w kroku 4 wcześniej podczas tworzenia konta Google Analytics.

Install GA code manually

Następnie należy zainstalować i włączyć wtyczkę WPCode. Aby uzyskać więcej informacji, zobacz nasz przewodnik krok po kroku, jak zainstalować wtyczkę WordPress.

Po włączaniu należy przejść na stronę Fragmenty kodu ” Nagłówek i stopka. Tutaj należy wkleić skopiowany wcześniej kod śledzenia Google Analytics do sekcji „Nagłówek”.

Enter tracking code in header using WPCode

Nie zapomnij kliknąć przycisku „Zapisz zmiany”, aby zapisać twoje ustawienia.

To wszystko, pomyślnie zainstalowałeś Google Analytics na twojej witrynie.

Metoda 3: Zainstaluj Google Analytics w motywie WordPress

Ta metoda jest przeznaczona dla zaawansowanych użytkowników, którzy znają kod. Jest nieco zawodna, ponieważ twój kod zniknie, jeśli zmienisz lub zaktualizujesz motyw.

Prawie nigdy nie zalecamy korzystania z tej metody.

Jeśli po raz pierwszy dodajesz kod do swoich plików WordPress, powinieneś zapoznać się z naszym przewodnikiem na temat kopiowania i wklejania fragmentów kodu w WordPress.

Najpierw musisz skopiować kod śledzenia Google Analytics, który skopiowałeś wcześniej w kroku 4. Można go zobaczyć w sekcji Instalacja Web Stream na karcie „Zainstaluj ręcznie”.

Install GA code manually

Istnieją dwa popularne sposoby dodania tego kodu do plików twojego motywu WordPress. Możesz wybrać jeden z nich (nie oba).

1. Dodaj kod w pliku header.php

Wystarczy edytować plik header.php w twoim motywie WordPress i wkleić skopiowany wcześniej kod śledzenia Google Analytics zaraz po tagu <body>.

Nie zapomnij zapisać zmian i przesłać pliku z powrotem na twój serwer.

2. Dodaj przez plik funkcji

Możesz również dodać kod śledzenia Google Analytics do pliku funkcji WordPress. Spowoduje to automatyczne dodanie kodu śledzenia do każdej strony w Twojej witrynie WordPress.

Będziesz musiał dodać ten kod do pliku functions. php twojego motywu.

<?php
add_action('wp_head', 'wpb_add_googleanalytics');
function wpb_add_googleanalytics() { ?>
 
// Paste your Google Analytics tracking code from Step 4 here
 
<?php } ?>

Nie zapomnij zastąpić fragmentu „Wklej tutaj swój kod śledzenia Google Analytics z kroku 4” w powyższym fragmencie kodu swoim kodem Google Analytics.

Zobacz raporty w Google Analytics

Google Analytics jest w stanie pokazać skarbnicę danych zebranych z twoich statystyk. Możesz zobaczyć te dane, przechodząc na Twój kokpit Google Analytics.

W lewej kolumnie zobaczysz wbudowane raporty Google Analytics. Każda sekcja jest podzielona na różne karty, a kliknięcie karty spowoduje jej rozwinięcie, aby wyświetlić więcej opcji.

GA4 reports

RaportyGoogle Analytics 4 różnią się nieco od poprzednich raportów Universal Analytics. W lewej kolumnie znajduje się dedykowana opcja Raporty. Raporty są pogrupowane w 2 szerokie kategorie, w tym Cykl życia i Użytkownik.

Jedną z najbardziej zauważalnych różnic w raportach GA4 jest brak wskaźnika współczynnika odrzuceń. Poza tym znajdziesz nowy interfejs raportowania, nowe wskaźniki, takie jak czas zaangażowania, brak celów w GA4 i nie tylko.

Oto zestawienie różnych raportów w Google Analytics 4:

  • RaportRealtime jest podobny do Universal Analytics i pokazuje włączanie użytkowników na twojej witrynie w czasie rzeczywistym.
  • RaportPozyskiwanie pokazuje, z jakich mediów korzystają użytkownicy, aby znaleźć twoją witrynę internetową, takich jak organiczne, z poleceń, e-mail i afiliacyjne.
  • Raportzaangażowania pokazuje konwersje i zdarzenia, które mają miejsce na twojej witrynie.
  • Raportmonetyzacji pokazuje wszystkie twoje dane e-handlu w jednym miejscu, wraz z nowymi raportami, takimi jak zakupy w aplikacji i reklamy wydawców.
  • Raportretencji zasadniczo pokazuje nowych i powracających użytkowników i pomaga uzyskać wgląd w retencję użytkowników.
  • Raportdemograficzny pomaga zobaczyć ruch na witrynie internetowej z najważniejszych krajów, miast i nie tylko. Pokazuje również podział na płeć i raporty zainteresowań.
  • Raporttechniczny pokazuje, które urządzenie, przeglądarka, system operacyjny, wersja aplikacji i rozmiar ekranu są najczęściej używane, aby zobaczyć twoją witrynę internetową.

Jak najlepiej wykorzystać Google Analytics

Google Analytics to niezwykle potężne narzędzie z mnóstwem niesamowitych funkcji. Niektóre z nich są dość oczywiste i łatwe w użyciu, podczas gdy inne wymagają dodatkowej konfiguracji.

Oto kilka zasób, które pomogą Ci w pełni wykorzystać raporty Google Analytics.

Google Analytics najlepiej współpracuje z Google Search Console (dawniej Google Webmaster Tools). Pozwala zobaczyć, jak twoja witryna internetowa radzi sobie w wynikach wyszukiwania. Zapoznaj się z naszym kompletnym przewodnikiem po Google Search Console, aby dowiedzieć się, jak go używać do rozwoju Twojej witryny internetowej.

Jeśli chcesz poprawić swoje rankingi SEO WordPress i uzyskać większy ruch, zalecamy skorzystanie z wtyczki AIOSEO dla WordPress, która jest kompleksowym zestawem narzędzi SEO.

Dostępna jest również darmowa wersja AIOSEO.

Ta wtyczka pomoże ci w pełni zoptymalizować twoją witrynę WordPress za pomocą odpowiednich znaczników schematu, map witryn i wszystkiego, czego potrzebujesz, aby poprawić swoje rankingi SEO.

Mamy nadzieję, że ten artykuł pomógł Ci dowiedzieć się, jak zainstalować Google Analytics w WordPress. Możesz również zapoznać się z naszym przewodnikiem na temat Google Analytics vs. Jetpack Stats lub naszym eksperckim wyborem najlepszych rozwiązań analitycznych dla WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Ujawnienie: Nasze treści są wspierane przez czytelników. Oznacza to, że jeśli klikniesz na niektóre z naszych linków, możemy otrzymać prowizję. Zobacz jak WPBeginner jest finansowany, dlaczego to ma znaczenie i jak możesz nas wspierać. Oto nasz proces redakcyjny.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Najlepszy zestaw narzędzi WordPress

Uzyskaj BEZPŁATNY dostęp do naszego zestawu narzędzi - zbiór produktów i zasobów związanych z WordPressem, które każdy profesjonalista powinien mieć!

Reader Interactions

848 komentarzyZostaw odpowiedź

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. jinson

    Hai.. I edited header.php file for Verifing Google Analitycs for my WordPress blog http://lastly.org. But after that it shows „The Google Analytics tracking code has not been detected on your website’s home page.” I tried after half an hour still the same result.
    Finally I used „Insert Header footer plugin and get the result.
    Thanks Syed.

  3. Akhil

    Actually I am using one WordPress plugin Google Analytics as I don’t want display the results on my website but I want them on WordPress itself. I have installed and configured the plugin successfully, one day it showed some visits on my websites but today it is showing same status as if no one has visited the website. But my friends have visited the website, that I have confirmed. What could be the issue?
    As someone said that google may take 3 to 4 hours to update the status, I waited. But the whole day has passed, still it is not showing any update.

    Thanks

  4. Aarish Maluja

    I have done everything right.It is showing everything ok but the data is not increasing from last month.my website is http://www.tecq.in.please help.

    • WPBeginner Support

      Aarish, Google Analytics code can not be found on your site. Please refer to second section of the article and choose another method to insert code into your WordPress site.

      Administrator

  5. aarish

    i installed the tracking info correctly but the data is not increasing .It is not showing any visits.still on zero

    • WPBeginner Support

      Check your Analytics dashboard, does it detect code on your site? Generally, when Google Analytics is added to a site for the first time it may take a while before you can see any data.

      Administrator

  6. Misty Young

    Thank you so much for your simple instructions! I was able to generate the Google Analytics code quickly and found the right spot in my theme to insert it within a couple minutes. Very helpful, thank you again!

  7. Vince

    Hi…I installed the 'insert headers and footers’ plug-in to my wp and copied my Google Analytics code to the footers box under settings, clicked save but GA is telling me the tracking is not installed. I did this 24 hrs ago. Did I do something wrong? Can you help?

    • WPBeginner Support

      can you see the analytics code in your site’s source code? You can view source by visiting your site, right clicking on any empty space and selecting view source from the menu. On the view source scroll down the document and see if you can find Google Analytics code there. Alternatively, you can try the second method described in the article.

      Administrator

  8. Mary

    I liked this post because anything to do with google seems to be quite complicated

    But I tried the plugin you recommended but GA wasn’t tracking.

    SO I just put the code on the page and it still isn’t tracking.

    Any advice? Thanks Mary

  9. Mary

    Thank you for this post, but google analytics isn’t showing up on my site

    I pasted the code into the footer of the „header and footer plugin”.
    It was blank.
    I saved the changes.

    But where will I find the analytics page? There is nothing labled google analytics.
    Thanks Mary

    • Mehul

      Let me know if you need help. I will be happy to help you in installing the Google Aanalytics Code on your website.

    • Alo Knows

      You’ll find all the Analytics data on your GA Account. Not on wordpress.

  10. Latreasa

    Can I add it to WordPress.com blog if my domain is hosted by godaddy.com? I would like to do this without having to change my blog to WordPress.org

    Regards

  11. Alin

    If you install Google Analytics Dashboard for WP you will be able to display Google Analytics data and statistics, in a chart, inside your WordPress Blog.

  12. Eddy

    Very useful post. I have a problem I install the GA wordpress plugin and when I go to the Settings > Google Analytics don’t show me anything only the title „Google Analytics for WordPress Configuration” what’s wrong with this? please I need help

  13. Lula

    Someone should really mention at some point that if you’re using wordpress.com (not wordpress.org) and you don’t have a separate software purchased for your sites hosting you CANNOT add google analytics there is no ability to add your own plugins. I think they think it’s better for wordpress to handle everything but I would have liked to have known this before starting.
    :X

    • Editorial Staff

      Sorry Lula, we have written numerous posts about the differences, but we simply cannot add on every article that this tip is only for WordPress.org users. All articles written on this site is intended for self-hosted WordPress users.

      Administrator

  14. Ann

    Thanks for the helpful tutorial. I installed GA using your plugin about a week ago and the page views that GA is showing are significantly less than what Jetpack is telling me. Page views according to GA are roughly half of page views per Jetpack. Is this typical?

  15. Anna

    Hi
    Thanks for the great simple instructions for beginners like me.
    I have installed this plugin successfully and activated it but I am unable to add the Google Analytics code as there is no Settings option!
    Under the Plugin name I only get two options: Deactivate or Edit
    I am probably being stupid but where can I find the plugin Settings option?
    Many thanks for your help

    • Noumaan Yaqoob

      @Anna the plugin settings are located under Settings > Insert Headers and Footers.

  16. Fran

    Status: Tracking Not Installed
    Last checked: Jun 16, 2013 7:44:16 PM PDT
    The Google Analytics tracking code has not been detected on your website’s home page. For Analytics to function, you or your web administrator must add the code to each page of your website.

    I used the header/footer plug in, followed instructions, and received this code.
    What should I do now? I’m hosted WP btw.

    • Editorial Staff

      Depending on the theme you are using, it may not have the default wp_head(); or wp_footer(); functions in place. Also if you have a caching plugin installed such as WP Super Cache or W3 Total Cache, then you need to empty the cache.

      Administrator

      • Jesse

        If the theme is not compatible with header / footer plug-in for analytics, is best to then copy the script manually into every page or is there a way to add the format required to the theme? Thanks!

        • WPBeginner Support

          No, you can still add the code in your theme’s footer.php file just before the /body tag.

  17. Kristina Larse

    Hi
    I added the tracking code to the header useing the plugin – i went in to my webshell and found the function.php file (in the them folder)- pastede

    // Placede my code here and removede the //

    But no matter where i try to paste it in the begingne, the end, efter the first break – the site just breaks down.

    Any idea whaat im doeing wrong?

    • Kristina Larsen

      //The code i pastede was like this

      // Placede my code here and removede the //

      //

  18. Waheed

    Thanks For This Great Tutorial :)
    I have One Question… i installed The Header and Footers Plugin, So Now I have To paste the Google analytic script In Header of the Plugin setting or Both Header and Footer?

    Thanks in advance?

  19. Chaotic Kristy

    Thanks this helped me out a lot

  20. Adam Moustafa

    I tried the plugin and the direct method but it still says tracking not installed.

    From the google analytics plugin on WP i do get information, though. Any help would be greatly appreciated.

  21. Mahmudul

    Thanks for this helpful post :D

  22. Matthew P. Schneider, LC

    What are the advantages of this over Site stats using JetPack. I have a self-hosted blog but use WordPress.com statistics that are available in the JetPack plugin.

    • Editorial Staff

      Google Analytics is far more advanced and give you much more data. However for some beginners it can get a little complicated. Jetpack Stats give simple data, but its easy to use.

      Administrator

  23. Tiffany

    I can’t find my footer or available plugins. Is there a real step-by-step once you are in your wordpress blog 'for dummies’? Help!

    • Editorial Staff

      If you can’t add plugins, then you are probably using WordPress.com. This will only work for self-hosted sites.

      Administrator

  24. TJ Ellis

    Amazing blog post it worked nicely! Thanks again

  25. Lanaya Green

    That is what it is about getting useful information thanks for the details it makes it so simple to have something you can follow step by step… Thank you rock on brother

  26. leo wolf

    Thank you for the clear stepwise description. I had already an account with Google Analytics showing the results on the website. Now I copied the script code in the functions.php, so far so good. Where and when can I expect the GA output now? Is it displayed in the footer?

    BTW: I don’t use a standard theme, but one built from scratch so maybe I miss something?

    Thnx in advance, Leo

    • Editorial Staff

      The output is not visible unless you view the source code of the page. You should see it towards the bottom in the source code.

      Administrator

      • leo wolf

        The title of this post suggests that you can have GA data at your site. But if is not visible, what’s the use then?

        • Editorial Staff

          Most tracking software will NOT make your data visible to the general public. Google analytics is a tracking software. You install it on your WordPress site, so you can get better insights about your audience. Google analytics works silently behind the scenes to capture data about your audience such as (what time they visited your site, who referred them, which pages they viewed etc).

  27. Louise Bibby

    Thanks so much for this info. It helped me overcome my paralysis with anything related to code. It was really useful!! Cheers Louise

  28. Alan

    Where do you get the code from step 6 if you do not get it the first time? I do not see it again when I log in.

    • Editorial Staff

      Login to Google Analytics. Look in the orange bar where it says Admin. Click on that. Under the accounts, click on the account that you want the code of. Under that account, you will see the property. Click on that property. There you will see a tab for Tracking info.

      Administrator

  29. Webbis

    This helped me a lot! But how do I do to measure my subdomains in the same account?

  30. Carly

    I wanted to do the paste. I made it to the footer.php page but there is no tag on that page so I can’t paste before it. What am I missing? Plus, I closed the Google page before reading your instructions not to do so. (I did copy the code.) Do I need to start over with Google? Thanks.

    • Editorial Staff

      No you do not. Just use the plugin we are recommending in the article above, and it will take care of it.

      Administrator

  31. Luis

    Thanks! The header and footer plugin helped me a lot!

  32. Naeem

    Thank you for this post.

    I am totally new in blogging and has recently set up a blog using wordpress platform.

    I have set up analytics account and paste the code using my theme’s option.

    Now my account is showing that tracking code installed.

    But the problem is in the audience section it is showing 0 visits while in the real time section it is showing 2 visitors.

    I am totally confused.

    ( My blog is under construction. Me and one of my friend is the only visitor. And I was unable to find single domain option. there are subdomain, mutiple top level domain options but no single domain option.)

    Can you please help me.

      • Michael Hickey

        I’m not at all sure what I am doing so perhaps you can help. Someone else that is not available now laid out my site. I was told to cut and paste the Google Analytics code one line below this last line of each page of my simple WP site. However, I cannot see where to do that for the Home Page. There is not a tab for the Home Page from the Dashboard. Any help is appreciated.

        • Editorial Staff

          Use our plugin that we mentioned, and it will add it on all pages of your site.

  33. Bob

    Does this plugin work retrospectively: that is to say, does it enter the the code into existing headers for pages that I’ve already developed on my WordPress site? I’ve put the script code in the header section and pressed save settings, but I’m not sure that that’s all I need to do.

    Any assistance would be gratefully received.

  34. Ameh

    Hi, great tutorial. Just one question. I have a desktop site and a mobile site. They both use different themes but have the same domain (www.dapopeyoh.com), so do i enter the google code in the footer.php file of one theme or both themes? Thanks.

  35. Saad

    Thank you so much for guiding me. I’ve completed and now waiting for 12-24 hours :)

  36. Omar

    I used the „Insert Header and Footer” plugin and pasted the google analytics code into the header in the settings of the plugin. I saved the settings and when I log into google analytics, the status is still „tracking is not installed.” Did I do something wrong and do I simply have to wait a while?

    • Editorial Staff

      If it is not working, then it means that your theme does not have wp_head(); in the header.php which is a standard for all WP themes.

      Administrator

      • Ryan

        So how would we be able to include the wp_head(); to the site?
        I have the same issue (I think) – tried different ways but tracking still stating not installed.

        • Editorial Staff

          It is supposed to be included in your theme’s header.php file in the head markup.

  37. David

    We have just started a WP blog as a sub-directory to our main site. We used the main site analytics code in the WP blog but I am not seeing any information about the pages visited in the blog. Should we create a separate analytics account for the blog sub-directory? If so, will that show us information about where visitors move from the blog to the main site?

  38. Monetsky

    Hi. Thanks for this tutorial. It simplified my life using the plugin to insert the code. I was wondering thoughif theres a way to get previous months data into google analytics? I only installed the code now and opened an account. Just wondering.. Thanks in advance. Great work!

    • Editorial Staff

      It cannot show you the data of things it didn’t track. The only way google can give you the data is if their script is on your page. Otherwise, they can’t.

      Administrator

  39. Bob Furber

    I followed the instructions to pate in footer.php, and the Tracking status shows „Receiving Data”.

    However, when I go to the bottom of the Word Press Dashboard, to the Google Analytics Dashboard Widget, there is a note:

    „You need to log in and select an account in the options panel.”

    On clicking the options panel or Settings -> Google Analytics Dashboard, I get the following error:

    „Error gathering analytics data from Google: GDatainsufficientPermissionsUser does not have any Google Analytics account. Please try again later.”

    The problem is later does not arrive and I can find no way out.

    • Editorial Staff

      The issue you are describing is with a specific plugin that you are using „Google Analytics Dashboard Widget”. You should ask that question in their support forum.

      Administrator

  40. Lisa - Une Belle Vie

    Hey, amazing that this is possible, but is google analytics replacing the normal wpstats ? Do you lose your views and information from that ?
    Thankyou!

    • Editorial Staff

      WP Stats is not a built-in WordPress plugin in self-hosted WordPress. Google Analytics is definitely a more robust platform.

      Administrator

  41. Lynette Chiang

    When you open Settings>Insert Header and Footer, there are two fields. You don’t specify above whether the code is to go in one field or both.

  42. marie

    My Google Analytical has stopped tracking and is showing all 0’s for the past week. Can you advise why?

    • Editorial Staff

      Is the code still added in your site? Did you change your theme? The only reason for it to be zero is if the code from your site got removed.

      Administrator

      • Savita

        My Google Analytical has stopped tracking and is showing all 0′s for the past week. Can you advise why?
        I looked in the footer if the code is still there, but I don’t remember what the code was or looks like (did not make a note of it so it seems…). It does not look good. So what can I do now?

        Above the in the footer.php it says:

        Thank you.

  43. vida

    hello
    my wordpress site is a free one and i don’t see any option for plugins. The site is http://www.lavidavidzi.wordpress.com i’m wondering if this url has the ability to add plugins. I can’t even find the footer option you’re referring to …am i even able to get google analytics ?

  44. Lauren

    How do I add a plugin? WordPress doesn’t let me edit my coding. I downloaded one of the plugins but how do I get it on my site?

    • Editorial Staff

      Please refer to our Videos that will show you how to add plugins in WordPress.

      Administrator

  45. figz91

    I tried to do this and lost everything, I think its because I put in the function.php coding in wrong but did it in the section where it said I was able to add in extra coding anyway.
     
    My site isn’t opening, neither my admin page to correct the problem it just says theres an http 500 error, I’m clueless and scared, is there anyway I can fix this problem? Please help.

    • wpbeginner

       @figz91 Yes, you would need to go through the FTP. Send us an email, and we can help you fix it.

      • Heidi

        The same thing just happened to me, please help me fix this asap!

        • Editorial Staff

          Heidi, you would have to use FTP to fix it. You are probably getting a syntax error because you pasted the code improperly.

  46. AdamCollins

    Aloha, so I signed up for analytics and placed the code in my theme options where there was a spot for my analytics built into the wp theme.  I also have a squeeze page on the blog. part of the domain and wondering do I upload the same code, or do I get another code?  Thanks so much.
     

    • wpbeginner

       @AdamCollins You can use the same code. Because that is on a separate page. You can see traffic by pages in Google Analytics.

  47. buckingham87

    Yeh hi… i tried to follow all this and now i have lost everything! i cant even login to my admin page!!
     
    HELP

    • wpbeginner

       @buckingham87 That probably happened because you pasted the code improperly in your functions.php file. https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/

      • figz91

         @wpbeginner I’m having the same problem Buckingham is and I’m about to breakdown. Regardless of why it’s happening I need to get back my 4 years worth of content and I can’t even get to my admin page let alone the actual site.
         
        Is there anyway to fix this. I’m clueless and have no idea what to do. Please help.

  48. Tommy Stuart

    What exactly does the following mean? I have a website that I put together compliments of Wealthy Affiliate University. Does that mean it’s a self-hosted or is it a free word press site?

    „Note: This is only for Self-Hosted WordPress.org blogs. Free WordPress.com sites cannot use Google Analytics. Maybe it’s time to upgrade from free WordPress.com to Self-Hosted WordPress? Consider using our Free WordPress Blog Setup program.”

    WHICH?

    • wpbeginner

      Go in your WordPress admin panel and click on Appearence > Editor … If you can edit all of your theme files, then you are on self-hosted.

  49. pradeepnairjc

    Very useful post. How should I add tracking in case I am using WordPress as a Subdirectory? For example- http://www.domain.com/blog.

    Do I copy -paste the same tracking code in the footer file or do I need to generate a new tracker code for this? I installed the analytics plug-in and configured it but somehow it never recorded visits although the data was being received successfully.

Zostaw odpowiedź

Dziękujemy za pozostawienie komentarza. Pamiętaj, że wszystkie komentarze są moderowane zgodnie z naszymi polityka komentarzy, a Twój adres e-mail NIE zostanie opublikowany. NIE używaj słów kluczowych w polu nazwy. Przeprowadźmy osobistą i konstruktywną rozmowę.