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.
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.