Error in Google Analytics (GA4) Course

It appears that the code snippets to copy are not matching up with the videos and what is being discussed in the course in a few places.

The image attached shows what is in the video - the first part of the code snippet should have the “get price” function but in the code snippet to copy it actually doesn’t include that function.

Thanks @john.matias! I’ll forward this to the team in charge

Hi John, yes, that’s correct!

The getPrice function was covered in some of the previous videos, so we didn’t include it over and over again. This way, you will not have the same function declared twice when you copy and paste the examples into your project.

Do you think that we should change that, and include the function declaration everywhere where it is used?

If you think it would be better, we can definitely make this update. :slightly_smiling_face:

Hi @emanuel thanks for the response and follow-up! In my case, I ran into a few issues trying to implement the code snippets. Which was also complicated more by the fact that I’m using Google Tag Manager too.

In general, I do believe that it would be ideal for the code snippet in the video to match the one that’s available for copy on the page. Sometimes that’s all it takes to throw me off because I’m thinking I missed something.

I ended up using the course as a starting point and then customizing the code snippets with help from ChatGPT to make it work with my specific set up and GTM.