๐Ÿ“ˆ

Measuring and visualizing page views on your website with Pixela

One of the properties that can be specified when creating a new graph definition or updating an existing graph definition is selfSufficient . The following is an example of an API request to update the selfSufficient of an existing graph to increment .
$ curl -X PUT https://pixe.la/v1/users/<username>/graphs/<graphID> -H 'X-USER-TOKEN:thisissecret' -d '{"selfSufficient":"increment"}'
{"message":"Success.","isSuccess":true}
Shell
A graph with its selfSufficient as increment will, when its image is displayed example, when GET - /v1/users/<username>/graphs/<graphID> of the graph is called โ€” , it will display the image of the graph and at the same time add the value of the day by the minimum unit.
ย 
The minimum unit is as follows:
ย 
  • If type of the graph is int :
    • 1
  • If type of the graph is float :
    • 0.01
ย 
In other words, the number of times the graph have been displayed can be directly showed on that graph. Therefore, itโ€™s a perfect way to measure and display the number of page views of your website.
ย 
In adminโ€™s blog, using Pixela to measure and visualize the number of page views.
In adminโ€™s blog, using Pixela to measure and visualize the number of page views.
ย 
If you prepare the graph that its selfSufficient is increment, then the thing you have to do is embedding the graph in the website where you want to measure page views
Once you have a graph with selfSufficient is increment , all you need to do is embed it in your website where you want to measure page views (the number of times the graph is displayed). Please see ๐Ÿ–ผ๏ธEmbedding a graph in your website in the easiest way about how to embed graphs in your website.
I embedded a graph in the footer of my blog!
I embedded a graph in the footer of my blog!

Notes

  • This feature does not provide exact measurements.
  • You can also specify decrement for selfSufficient . It will subtract the value of the day by the minimum unit. The minimum unit is as follows:
    • If type of the graph is int :
      • -1
    • If type of the graph is float :
      • -0.01

Related