I do not know a lot about jquery, but I’m looking for a solution for this problem.
I need to extrapolate the last parameter of the URL, if it is equal to “adv_source = AdWords” then I must return “AdWords”, otherwise I must give “SEO”.
This is what I managed to do until now.
Can anyone help me?
var url=jQuery('[_url]').val();
if (url.search("adv_source=AdWords")) seoadwords = "Adwords";
else seoadwords = "SEO";
Thanks in advance
2
Answers
Here is a working solution :
I found the solution here : Get url parameter jquery Or How to Get Query String Values In js
Or shorter solution:
I hope it helps.
Without knowing the format of your url’s you can do