analytics.google wo könnte mein Fehler sein?

Hallo,

ich habe analytics eingerichtet. Mir fehlen  irgendwo nocht Einstellungsdaten und weiß nicht wo das sein kann.

Was mus hier wo eingetragen werden?

 

Tracking-Code des allgemeinen Website-Tags (gtag.js):

gtag(‚set‘, {‚user_id‘: ‚USER_ID‘}); // Legen Sie die User ID mithilfe des Parameters „user_id“ des angemeldeten Nutzers fest.

 

 

Tracking-Code für Universal Analytics (analytics.js):

ga(‚set‘, ‚userId‘, ‚USER_ID‘); // Legen Sie die User ID mithilfe des Parameters „user_id“ des angemeldeten Nutzers fest.

 

MfG Rainer

die USER_ID fängt mit “UA-”(universal analytics) oder “GTM-” (google tag manager) an.

Wenn du kein Plugin nutzt. musst du das im Theme manuell eintragen.

Danke für die Hilfe.

Im Shop:

in Google Analytics sieht es so aus:

 

Unter

sieht es so aus. Wobei sich die User-Id nicht ansteuern lässt.

Ich mache irgendwas falsch.

Ah ok. Das ist nicht diese ID.

Was hier eingetrage wird ist die Tracking-ID . Klick mal bei Google auf Tracking-Information -> Tracking-Code.

Da steht dann deine ID und diese musst du im Shop eintragen.

Ja, die habe ich drin.

Google Analytics bringt denoch keine Daten.

@AMSPO24online schrieb:

Ja, die habe ich drin.

Google Analytics bringt denoch keine Daten.

Cookies denn akzeptiert?

 

Alle Cookies im Shop akzeptiert   ja

jetzt egal, ich hatte nebenbei Matomo installiert. Das funktioniert wenigstens.

 

analytics.google versuche ich schon einige Tage einzurichten, ohne erfolg.

Vielen Dank.

Ich habe alles versucht, den Shop mit Analytics zum laufen zu bringen.

Cache gelöscht und die Tracking-ID eingetragen. Die Datenschutzerklärung akzeptiert.

Da tut sich nichts.

Shopware 6 → Google Analytics-Integration Tracking-ID: UA-19XXX22XX-1 eingetragen → Analytics mit gleicher Tracking-ID: UA-19XXX22XX-1 eingetragen. Alle Zustimmungen gemacht.

Nutze: universal analytics

Gruß Rainer

Hi Rainer,
Change script block in analytics.html.twig file to google analytics website tracking code. The Google analytics code starts running immediately. This is a Shopware 6 google analytics error, I also experimented for several days while just changing the tracking code in a twig file.

Hi markssar,

Many Thanks - where can I find the script block exactly?

I don’t know enough about that. Need detailed information!

Sincerely
Rainer

Hi Rainer - file path is YourShopFolder-vendor-shopware-storefront-Resources-views-storefront-component-analytics.html.twig. It looks like this. This of course may not be right to fix the system, but it works! Insert Yours UA tracking numbers!

{% block component_head_analytics %}
{% if context.salesChannel.analytics and context.salesChannel.analytics.isActive() %}
{% set trackingId = context.salesChannel.analytics.getTrackingId() %}



window.dataLayer = window.dataLayer || ;
function gtag(){dataLayer.push(arguments);}
gtag(‚js‘, new Date());

        gtag('config', 'UA-19_Your_Tracking_UA-1');
    </script>
{% endif %}

{% endblock %}

Hi Rainer, Use all your google tracking code - my example was corrupted by copying it into this chat! Just follow the principle where to insert the code block!

wird hochgeladen: Screen Shot 2021-04-25 at 13.22.49.png…

Good Morning,

thank you for the detailed information. I don’t know what is blocking. I will continue to use Matomo.

I had the Gambio software before and it worked.
Thanks again for your help.

With best regards
Rainer