Plugin Author
berkux
(@berkux)
You describe the basic idea of this plugin.
https://developer.similarweb.com/estimated_visits_api shows that you need a apikey (provided by the api).
with that you can
[jsoncontentimporter url=https://api.similarweb.com/v1/website/cnn.com/total-traffic-and-engagement/visits?api_key={UserKey}&start_date=2016-01&end_date=2016-03&main_domain_only=false&granularity=monthly]
{subloop-array:visits:-1}
{visits.date}
{/subloop-array:visits}
[/jsoncontentimporter]
Bernhard
Cool. How could i have a user input the URL, start and end dates?
Plugin Author
berkux
(@berkux)
This is a PRO-feature 😉
There is a shortcode-parameter urlparam to manage that.
i will buy pro, if i know how to implement the variable insertion.
Plugin Author
berkux
(@berkux)
This done this way:
[jsoncontentimporterpro url=https://api.similarweb.com/v1/website/cnn.com/total-traffic-and-engagement/visits?api_key={UserKey}&start_date=2016-01&end_date=2016-03&main_domain_only=false&granularity=monthly urlparam=start_date#end_date]
{subloop-array:visits:-1}
{visits.date}
{/subloop-array:visits}
[/jsoncontentimporterpro]
Then you can do “wp-page-url?end_date=2016-02” which will add the value of end_date to the url.