Hello! I have a very small programming project that needs a developer. Here are the basics:
- Grab the URL of the current page.
- Cut out the domain part of the URL, then put the remainder into a custom URL (which I have figured out) and send it to the analytics service we use.
- Take the resulting XML snippet which will contain the number of views for that page over the past year, and pull out only the number.
- Put that number into something that can be displayed on the page with the word “Views:”.
I’ve already gotten the query URL figured out; when I put it into the address bar of a browser and hit Enter, it returns this XML, with the correct number of page views for the URL I sent:
<response status="ok">
<type type="pages">
<date date="2021-10-22,2022-10-21">
<item>
<value>1610</value>
</item>
</date>
</type>
</response>
Now I need someone to figure out how to automate the process and display the result on each page on the site.
If interested, message me with your info.
OR, if you immediately see how to do this and want to save me money, post the answer below.
Thanks!