Hard refresh a page

Hey there, first time poster.

I’ve been having some trouble getting Google Ads to notice that a conversion occurs on our site. It only seems to occur once every so often. After a call with one of their Tag advisors, they suggested it’s because the page isn’t “hard-refreshing” for every user.

I was wondering if anyone else had ever had this problem and if it could be solved with Velo?

I’ve tried solving this with my limited knowledge and taking some code from the API/Forum posts but I’ve not had any luck.

The user clicks to submit a form and is then taken to a success page. Is it possible to force the browser to ‘hard refresh’ when the user moves to the success page?

I hope this is sufficient information to solve the issue. Please let me know if there’s anymore I can provide. Cheers.

I’ve now got it set to work with a timer but I’d like to just have it refresh once. Would this be possible?

If you wish for some reason to refresh the current page one time, you can do something like:

import wixLocation from 'wix-location';
const urlQuery = wixLocation.query;
const alreadyRefreshed = urlQuery?.refreshed;
if(!alreadyRefreshed){
wixLocation.to(wixLocation.url + "?refreshed=true");
}

@jonatandor35 Hey there, cheers for the answer.

It’s currently saying that it can’t find find the ‘wixLocation’ module or corresponding type declaration.

@jameskbroadoak Sorry. I had an error in the first line. fixed.