Skip to main content
All CollectionsMarketReports
Sending Amplitude and Google Analytics events
Sending Amplitude and Google Analytics events
Andrew avatar
Written by Andrew
Updated over 4 months ago

Amplitude

Sending events for Amplitude-analytics and Google Analytics happens in controllers or js scripts

In the controllers looks like this:

$this->analytics->track('user_modal_login_success', ['controller' => 'users']);

In js:

sendAnalytics('dp_user_profile_btn_edit_field', 'my_profile', 'user');

For Amplitude to be connected correctly and quickly you need to do this via .env.production (at the root of the product)

The amplitude key is assigned to the AMPLITUDE_KEY variable

Choose a project

Also make sure that the variable ANALYTICS_PROFILES = basic, user_extended, admin_extended

To make sure that events are being sent, you can see the requests being sent in the browser of the developer tool (in the Network section)

Google Analytics

To configure and activate Google Analytics, simply add the Google code through the admin panel.โ€‹

Did this answer your question?