All Questions
Tagged with google-analytics php
1,176 questions
1
vote
0
answers
35
views
Google analytics not assigning to traffic acquisition
I'm facing a problem with custom events sent to Google Analytics. The main problem is that custom sent events are being assigned only to user acquisition and not to traffic acquisition.
I'm sending 2 ...
0
votes
0
answers
56
views
PHP Google BetaAnalyticsDataClient get date of first page visit
I have the following code for getting a list of pages with the most page visits in the last 7 days from Google Analytics.
use Google\Analytics\Data\V1beta\Client\BetaAnalyticsDataClient;
use Google\...
-1
votes
1
answer
121
views
unknown urls in my Google Analytics performance dashboard
I have a hobby wordpress website with around 4 pages and 4 posts in total. Google notified me that my website has "malware". The link that I was notified was this:
I checked my Google ...
0
votes
0
answers
26
views
Universal Analytics v4 API | Load two dimensions merge with a one query
I'm integrating an API for loading data from the Google Analytics Reporting API v4.
Here, I need to find the transaction count based on 'ga:medium' and 'ga:pagePath.'
For example, let's say I have 10 ...
0
votes
0
answers
32
views
Can I track an event server side on Google Analytics 4 only using user_id (and NOT client_id)?
Let's assume this flow:
User logins to the app
A user-id is set to a unique hash my-unique-user-id on google analytics client SDK.
Then, on server side, I want to track a My Custom Event that applies ...
1
vote
2
answers
196
views
How can i add a google tag manager script on wordpress edit.php screen?
Here i am trying to add a google tag manager script on wordpress backend edit.php screen but whenever i add a script it gives error in console.
Refused to load the script 'https://www.googletagmanager....
0
votes
0
answers
80
views
Google Analytics API error - User does not have sufficient permissions for this profile
I am trying to access my Google Analytics using the following Laravel library:
"https://github.com/spatie/laravel-analytics"
I have created a service account on https://console.cloud.google....
1
vote
0
answers
161
views
Namespaces not properly working after using php-scoper
My plugin was having conflict with the other plugin if it was using google library in Wordpress. Previously my vendor folder was namespace by prefix Analytify using php-scoper excluding the namespaces ...
0
votes
0
answers
45
views
Why is my Google_Service_AnalyticsReporting object not getting recognized?
I have used code from google analytics api official documentation
<?php
require_once ('google-api-php-client--PHP7.4/vendor/autoload.php');
// $analytics = initializeAnalytics();
$response = ...
3
votes
1
answer
143
views
Fatal error: Uncaught Error: Google\Auth\HttpHandler\HttpHandlerFactory::build()
I have two plugins MyPluginOne and MyPluginTwo. In MyPluginTwo Plugin when I configure my social login as Google (Login as Google), I get following error:
Fatal error: Uncaught Error: Google\Auth\...
0
votes
1
answer
180
views
Google Analytics v4 PHP SDK - Unable to authenticate BetaAnalyticsDataClient . No error thrown
I am trying to retrieve pageview data for a partner site that I already have a refresh token, but when I try to create a new BetaAnalyticsDataClient object using an OAuth2 object, the script dies and ...
0
votes
0
answers
54
views
Google Analytics Data Api (GA4) Get Transccation with depended infromation
we are moved to GA4 and now i'm trying to get data from GA4, but i cant move some part of code
$filters = ['dimensions' => 'ga:transactionId,ga:deviceCategory,ga:channelGrouping'];
...
1
vote
1
answer
564
views
How to send ad revenue to GA4 using a measurement protocol event?
I'm trying to get the ad revenue from a external source into the GA4 "Monetisation" -> "Publisher Ads" report by sending an event using the measurement protocol from php. ...
1
vote
0
answers
65
views
I'm having trouble migrating from Universal Analytics (v3) to Google Analytics v4
I have a PHP application that collects data from Universal Analytics, but now there's no more data, and I need to retrieve data from GA4. I've tried to update the functions according to the ...
0
votes
1
answer
245
views
Google Tag Manager js library sometimes loading sometimes not
We are using Magento 2 CMS and we add a proper script like this -
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'...