Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin integration of google analytics LBC-324 #470

Open
wants to merge 18 commits into
base: production
Choose a base branch
from

Conversation

Moggach
Copy link
Contributor

@Moggach Moggach commented Jun 21, 2023

Description

This PR begins the process of integrating Google Analytics 4 reporting into LBC
Steps taken:

  1. Add google analytics tracking code to base.html
  2. We have default acquisition and engagement data
Untitled34 Screenshot 2023-06-21 at 11 27 48
  1. I added some GA4 events to measure some key ecommerce events on the site e.g. membership purchase, donation, gift membership purchase
  2. Most of these load when certain pages load e.g. completed_membership_purchase.html
  3. I've been using these docs as a guide
    https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag
    https://stripe.com/docs/payments/checkout/analyze-conversion-funnel
    although possibly there's a better way to do this on the server side using webhooks or similar. I wasn't sure.

Further steps to take based on current implementation:

  1. Work out a way to generate a unique transaction ID - I wondered if this could be based on a stripe transaction ID and whether this is available in the template?
  2. Test that these events are being reported to Google Analytics with the relevant data to make them useful e.g. items purchase, value of transaction etc

NB there is a purchase event from yesterday which was probably me accidentally buying a book and then refunding it. That indicates that there may be some default ecommerce reporting active. There's no product data associated with it though

Untitled Screenshot 2023-06-21 at 11 41 22

Motivation and Context

Linked to issue LBC-324

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@Moggach Moggach requested a review from janbaykara June 21, 2023 10:42
@Moggach Moggach changed the title Begin integration of google analytics Begin integration of google analytics LBC-324 Jun 21, 2023
@linear
Copy link

linear bot commented Jun 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant