1

This question has one main goal; to bring in Response data from an HTTP POST sent by PayPal into GA.

Validating the IPN has not been the issue; all PayPal data is successfully received. The Issue lies in trying to send the data to GA; there is something not communicating and no data is sent.

I believe it is a scope issue with the ga javascript object somehow not firing correctly.

Currently I have a <script = 'text/javascript'> tag that exists in the source code of a Content (Page)

This code listens for and validates the IPN POST as response.

if (response == 'VERIFIED') {... I store what should be the price in var x = e.parameter.mc_gross Then after everything is matched I run, ga(function () { ga('set', 'metric3', x); });

I have combed through this documentation and it is miserable trying to find a solution. I am now trying to open the website file in VS to see if I can create a custom module to solve this issue but even finding where to download the site or how to upload a module is increasingly frustrating.

Thank you for your help, I really appreciate anyone taking time to answer, especially now.

  • 1
    Where exactly are you putting the custom javascript on the Page content item and where did you include analytics? Where is your website hosted? Complex scenarios like this usually require a custom module, but you shouldn't need to upload it to gallery. You can simply add custom modules to your solution and use them as is. – Lawyerson Apr 12 '20 at 10:59
  • The custom javascript is inside the body of the Page content item. The analytics is integrated through GTM as a universal tag on all pages. << I can see this being the issue. As it fires on page view >> The hosting shouldn't be the issue? The only thing is that I haven't found it simple to add a module, I see featured and a gallery some modules that I think would help like 'C# Scripting' are enabled but how do I use them? I'm sorry if this is obvious; I'm coming from 'React' and this is all brand new. – Jared Bernhart Baez Apr 12 '20 at 18:42
  • Writing javascript on a page's layout doesn't seem like a great idea, since you have no control over dependencies, order of execution etc. I would forget about trying to implement this with the basic building blocks. The reason I ask about hosting is because it's very simple to add custom features IF you are building the source and yourself and have access to the files. Just create a custom module and set up a classic MVC controller with a view that includes all of your scripts. See http://docs.orchardproject.net/en/latest/Documentation/Writing-a-content-part/ to get started. – Lawyerson Apr 12 '20 at 19:44

0 Answers0