skip to Main Content

Tracking a campaign with URI params in GA4

Once upon a time adding the following URL params to a URL would log a view in Google Analytics as a campaign, medium, and so on (note this is Facebook template): ?utm_source={{site_source_name}}&utm_medium={{placement}}&utm_campaign={{campaign.name}}_{{adset.name}}&utm_content={{ad.name}} However, GA4 doesn't seem to be logging these…

VIEW QUESTION

Php versions – How use Google Analytics Reporting api with new GA4 accounts

Before GA4 i use a custom php dashboard with dimensions and metrics for reporting stats. I use VIEW_ID for having my stats. Here my code : function initializeAnalytics(){ $KEY_FILE_LOCATION = '/google-api-php-client/service-account-credentials.json'; $client = new Google_Client(); $client->setApplicationName("Reporting"); $client->setAuthConfig($KEY_FILE_LOCATION); $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']); $analytics =…

VIEW QUESTION
Back To Top
Search