Home

Awesome

Server Side Analytics for Magento 2

This extension aims to solve the problem of discrepancies between Magento revenue reports and the revenue reports in Google Analytics.

That problem arises due to the fact that a certain number of people close the browser window before returning to Magento's success page. Since Google Analytics is Javascript based, and thus client based, the GA Purchase Event will not be fired and the order will not be registered in Analytics.

Another reason why this problem arises is that people decide to pay at a later point in time through a different platform (like the PSP's), using a link in an email for example.

Installations

composer require elgentos/serversideanalytics2
bin/magento setup:upgrade

Sample query for GraphQL to set the GA data

mutation AddGaUserId($cartId: String!, $gaUserId: String, $gaSessionId: String) {
                            AddGaUserId(input: {
                                    cartId: $cartId
                                    gaUserId: $gaUserId
                                    gaSessionId: $gaSessionId
                                }
                            ),
                            {
                               cartId
                               maskedId
                            }
                    }

Caveats

Further info