Pull historical traffic from your GoSquared account given a date range and time interval ("day", "month", "week", "year").
By default, this pulls data from the GoSquared demo account. Add your own API keys to get data from your own account.
Copy this URL into Tableau's Web Data Connector input:
https://t.blockspring.com/bs/get-historical-traffic-with-gosquared
Finish the setup steps to use Get Historical Website Traffic in Tableau.
Finish the setup steps to use Get Historical Website Traffic in Slack.
Run this function with a POST request to Blockspring.
Visit the node.js quickstart to get started fast.
Visit the php quickstart to get started fast.
Visit the python quickstart to get started fast.
Visit the ruby quickstart to get started fast.
Visit the r quickstart to get started fast.
Visit the javascript quickstart to get started fast.
Use this URL for webhooks. You'll want to make a POST request.
curl -H "Content-Type: application/json" -d "{ \"from_date\": , \"to_date\": , \"interval\": , \"sitetoken\": , \"apikey\": }" "https://run.blockspring.com/api_v2/blocks/get-historical-traffic-with-gosquared?"
var blockspring = require("blockspring");
blockspring.runParsed("get-historical-traffic-with-gosquared", { "from_date": , "to_date": , "interval": , sitetoken: , apikey: }, function(res) {
console.log(res.params);
});
var request = require("request");
request.post({
url: "https://run.blockspring.com/api_v2/blocks/get-historical-traffic-with-gosquared?",
form: { "from_date": , "to_date": , "interval": , sitetoken: , apikey: }
},
function(err, response, body) {
console.log(JSON.parse(body));
});
<?php
$url = 'https://run.blockspring.com/api_v2/blocks/get-historical-traffic-with-gosquared?';
$data = json_encode(array("from_date" => , "to_date" => , "interval" => , "sitetoken" => , "apikey" => ));
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => array("Accept: application/json", "Content-Type: application/json"),
'method' => 'POST',
'content' => $data,
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
var_dump(json_decode($result));
?>
<?php
require('blockspring.php');
var_dump(Blockspring::runParsed("get-historical-traffic-with-gosquared", array("from_date" => , "to_date" => , "interval" => , "sitetoken" => , "apikey" => ))->params);
import json
import urllib2
req = urllib2.Request("https://run.blockspring.com/api_v2/blocks/get-historical-traffic-with-gosquared?")
req.add_header('Content-Type', 'application/json')
data = { "from_date": , "to_date": , "interval": , "sitetoken": , "apikey": }
results = urllib2.urlopen(req, json.dumps(data)).read()
print json.loads(results)
import blockspring
import json
print blockspring.runParsed("get-historical-traffic-with-gosquared", { "from_date": , "to_date": , "interval": , "sitetoken": , "apikey": }).params
require 'rest_client'
response = RestClient.post 'https://run.blockspring.com/api_v2/blocks/get-historical-traffic-with-gosquared?', JSON.dump({ "from_date" => , "to_date" => , "interval" => , "sitetoken" => , "apikey" => }), :content_type => :json
puts JSON.load(response)
require 'blockspring'
puts Blockspring.runParsed("get-historical-traffic-with-gosquared", { "from_date" => , "to_date" => , "interval" => , "sitetoken" => , "apikey" => } ).params
require 'rest_client'
response = RestClient.post 'https://run.blockspring.com/api_v2/blocks/get-historical-traffic-with-gosquared?', JSON.dump({ "from_date" = , "to_date" = , "interval" = , "sitetoken" = , "apikey" = }), :content_type => :json
puts JSON.load(response)
library('blockspring')
library('rjson')
print(blockspringRunParsed("get-historical-traffic-with-gosquared", list( "from_date" = , "to_date" = , "interval" = , "sitetoken" = , "apikey" = ))$params)
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://cdn.blockspring.com/blockspring.js"></script>
<script>
blockspring.runParsed("get-historical-traffic-with-gosquared", { "from_date": , "to_date": , "interval": , sitetoken: , apikey: }, { "api_key": "" }, function(res){
console.log(res.params);
})
</script>
https://run.blockspring.com/api_v2/blocks/get-historical-traffic-with-gosquared?
Finish the setup steps to use Get Historical Website Traffic in Code.