I want to update this number through client’s api : http://data.memopresso.com/api/data/count
where should I put the script code?
document.getElementById("printCount").innerHTML = data.count;
document.getElementById("printCount").innerHTML = '0';
Hi @yuenletsgo, I woud put that in the Before Body section of custom code in project settings or in page settings. Here are some good resources:
Using custom code in the head and body: https://university.webflow.com/article/how-to-add-custom-head-and-body-code-to-a-webflow-site
Using custom code in an embed component on the page: https://university.webflow.com/article/embed
That code appears to be targeting an element having an ID of “printCount” so make sure there is an element on your page having that matching ID.
I hope this helps