Closed mohammadx0098 closed 3 months ago
Hey @mohammadx0098. Thanks for using GAP and taking the time to raise this. I'll have a look into it next week and try to get an update out Regards Xnl
Thanks for looking into it and suggesting the code. Unfortunately I get a mostly false positives with this particular regex. For example if you have code case 0:a=1337
then you end up with 0
as a parameter name, or just a string like "User status: suspended"
would give you a paramater of status
.
There is a lot possible ways that variables are declared in javascript and all quite difficult to get accuratley with regex. That's why I just stuck to the basic var
, let
and const
initially.
Unfortunately I'm not a JS expert to know all those possible ways. For the case of dataLayer.push
I think you'd need to identify the whole data structure (so dataLayer.push
would be in the regex, and then get the parameters from that).
Or maybe there's another way of using a third party library that actually parses javascript?
Hi @mohammadx0098 . If you get the latest version of GAP, v5.2, and make sure you select the "Javascript variables and constants" option under Parameters, then it should retrieve the keys for dataLayer.push
now. If you want to give it a try and let me know if it resolves ypur issue, then let me know. Thanks
Hi @xnl-h4ck3r Thank you for resolving this issue.
for example : pageName
to fix this I try adding this code to line 3350 ... and it worked for me. there are some false positive but it was ok for me.