Google Analytics Integration Problem

#1

Hello there.

How to integrate GA in pimcore? I found not much in the docu. What I tried:

In website settins under google credentials: ID and E-Mail + Uploaded the JSON file in /var/config with the name: google-api-private-key.json

Then here in marketing settings / google analytics / advanced integration. I think you should be able to choose the profile after that. But i can’t:

I think the problem already starts with the “service account”. how exactly you have to set up this “service account”. or can you see anywhere else a failure?

Thanks!

0 Likes

#2

My guide how to link Google Services with Pimcore
You need to enable Analytics API and join it with GA, …

API

  • https://console.developers.google.com/project
  • Projects > Create project: jaks-sk
  • IAM & Admin > Service accounts
    • Create service -> App Engine viewer: api_id
    • Create service -> Project viewer = api_email
      • Create key > json (notasecret)
      • Download json
  • APIs & services > Credentials
    • Create credential > API key
      • Name: s_api_key
      • Restrict - IP: xxx.yyy.220.152
    • Create credential > API key
      • Name: b_api_key
      • Restrict - HTTP:
        • *.jaks - DEMO
        • *.jaks.sk - PROD
  • APIs & services > API Library
    • Enable Analytics API
    • Enable Custom Search API
    • Enable Google Static Maps API
    • Enable Google Maps JavaScript API
    • Enable Google Geocoding API

Analytics

  • http:// www.google .com/analytics/
  • Admin / Account -> Create new account / Website
    • Account name: jaks
    • Website name: jaks.sk
    • Website URL: ** **
    • Industry category
    • Reporting Time Zone
    • Get Tracking ID : track_id
  • All website data > View settings
    • Sledovanie vyhľadávania na webe
    • query param = q
  • User Management
    • Add permisions for: api_email (read)
    • Add permissions > jaks@gmail.com

Custom Search Engine – CSE

  • https:// cse.google .com/cse/all , http:// support.google .com/customsearch/
  • Add
    • Sites to search: www.jaks.sk/sk/*
    • Language: slovak
    • Name: jaks.sk/sk
  • Setup
    • search engine ID: cse_id
    • Image search = OK
  • Look and feel
  • Statistics & logs / Google analytics: Select profile

Search console

  • https:// search.google .com/search-console
  • Add property
    • Web : https:// www.jaks.sk
    • Get html_ver

Join with Pimcore

  • copy json to $/app/config/pimcore/google-api-private-key.json
  • $/var/config/system.php
    • Client ID = api_id
    • Email = api_email
    • Server API-Key = s_api_key
    • Browser API-Key = b_api_key
  • $/var/config/reports_prod.php
    • Track-ID = track_id
    • Verification: html_ver

ReCaptcha

  • https:// www.google .com/recaptcha/admin#list
    • label: jaks.sk
    • reCAPTCHA V2
    • Domains: jaks.sk
0 Likes

#3

Hi,
would you like to share your findings in a documentation page?

Thanks…

BR
Christian

0 Likes

#4

that would be great!

0 Likes

#5

thanks for your effort. will try it!

0 Likes