Skip to content

Commit

Permalink
use rakam.io
Browse files Browse the repository at this point in the history
  • Loading branch information
buremba committed Jun 24, 2016
1 parent 86699e4 commit 59056c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build Status](https://travis-ci.org/buremba/rakam-javascript.svg?branch=master)](https://travis-ci.org/buremba/rakam-javascript)

# Setup #
1. If you haven't already, go to http://rakam.com and register for an account. You will receive an API Key.
1. If you haven't already, go to http://rakam.io and register for an account. You will receive an API Key.
2. On every page that uses analytics, paste the following Javascript code between the `<head>` and `</head>` tags:

<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rakam-js",
"author": "Rakam <support@rakam.com>",
"author": "Rakam <support@rakam.io>",
"license": "MIT",
"description": "Javascript library for Rakam Analytics",
"keywords": [
Expand Down
12 changes: 6 additions & 6 deletions test/rakam.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('Rakam', function () {
rakam.User().set({'prop': true});
server.respondWith("1");

assert.equal(server.requests[0].url, 'http://api.rakam.com/user/set_properties');
assert.equal(server.requests[0].url, 'http://app.rakam.io/user/set_properties');
assert.equal(server.requests[0].method, 'POST');
assert.equal(server.requests[0].async, true);
assert.deepEqual(JSON.parse(server.requests[0].requestBody).properties, {'prop': true});
Expand All @@ -96,7 +96,7 @@ describe('Rakam', function () {
rakam.User().setOnce({'prop': true});
server.respondWith("1");

assert.equal(server.requests[0].url, 'http://api.rakam.com/user/set_properties_once');
assert.equal(server.requests[0].url, 'http://app.rakam.io/user/set_properties_once');
assert.equal(server.requests[0].method, 'POST');
assert.equal(server.requests[0].async, true);
assert.deepEqual(JSON.parse(server.requests[0].requestBody).properties, {'prop': true});
Expand All @@ -106,7 +106,7 @@ describe('Rakam', function () {
rakam.User().increment('prop', 1);
server.respondWith("1");

assert.equal(server.requests[0].url, 'http://api.rakam.com/user/increment_property');
assert.equal(server.requests[0].url, 'http://app.rakam.io/user/increment_property');
assert.equal(server.requests[0].method, 'POST');
assert.equal(server.requests[0].async, true);
assert.deepEqual(JSON.parse(server.requests[0].requestBody).property, 'prop');
Expand All @@ -117,7 +117,7 @@ describe('Rakam', function () {
rakam.User().unset('prop');
server.respondWith("1");

assert.equal(server.requests[0].url, 'http://api.rakam.com/user/unset_properties');
assert.equal(server.requests[0].url, 'http://app.rakam.io/user/unset_properties');
assert.equal(server.requests[0].method, 'POST');
assert.equal(server.requests[0].async, true);
assert.deepEqual(JSON.parse(server.requests[0].requestBody).properties, ['prop']);
Expand All @@ -127,7 +127,7 @@ describe('Rakam', function () {
rakam.User().unset(['prop']);
server.respondWith("1");

assert.equal(server.requests[0].url, 'http://api.rakam.com/user/unset_properties');
assert.equal(server.requests[0].url, 'http://app.rakam.io/user/unset_properties');
assert.equal(server.requests[0].method, 'POST');
assert.equal(server.requests[0].async, true);
assert.deepEqual(JSON.parse(server.requests[0].requestBody).properties, ['prop']);
Expand Down Expand Up @@ -182,7 +182,7 @@ describe('Rakam', function () {
it('should send request', function () {
rakam.logEvent('Event Type 1');
assert.lengthOf(server.requests, 1);
assert.equal(server.requests[0].url, 'http://api.rakam.com/event/batch');
assert.equal(server.requests[0].url, 'http://app.rakam.io/event/batch');
assert.equal(server.requests[0].method, 'POST');
assert.equal(server.requests[0].async, true);
});
Expand Down

0 comments on commit 59056c2

Please sign in to comment.