Rewardful - Help needed to pass Referral ID to Xano

So I have a Rewardful script on the head of all the pages of my app, but one of the workflow actions I want to run depends on the value of that cookie. I can’t test this out on the editor because it looks like the scripts in the header don’t fire while in the weweb editor.

The issue I’m running into is passing the Rewardful “referral ID” to the client_reference_id parameter in Xano, that way I can track affiliates.

Once a user visits my weweb app via an affiliate link, the cookie is stored on the user’s browser, and I need to somehow pass that ID to the xano endpoint.

I’ve attached a screenshot of the JS code i want to test,

any ideas how?

Hey @franciscolora0524! How did you pass it in the end?

To run scripts in the Editor you gotta use @raydeck’s WeWeb Embed converter.


Thank you for the shout-out @Broberto!

I would run the code as @franciscolora0524 had it in the page load event. You can put the rewardful script tag in the custom code header, but then you can only test after publishing. If you want to test in the editor, you would want to load that at the page load too. I made the tool to make that easier.

A lot of my weweb videos on are based on this two-step of loading in a script tag via the embedded, and then firing off whatever action you want to use with it in a later javascript step in the same workflow (after a delay) or in a later workflow.