Skip to content

Commit

Permalink
v2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jan 8, 2020
1 parent c005a4a commit bbd4a44
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 71 deletions.
28 changes: 0 additions & 28 deletions DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Here are the APIs that Taplytics.js exposes:
| [runningExperiments](#runningexperiments) | Taplytics running experiments |
| [variable](#variable) | Taplytics variable |
| [codeBlock](#codeblock) | Taplytics code block |
| [startNewSession](#startNewSession) | Taplytics startNewSession |


If you haven't already, check out our guide on how to get started with our Javascript SDK [here](https://taplytics.com/docs/javascript-sdk).
Expand Down Expand Up @@ -64,7 +63,6 @@ Taplytics.init("js-sdk-token", {
log_level: 1
});


```


Expand Down Expand Up @@ -119,7 +117,6 @@ Taplytics.identify({
friends_Count: 800
});


```


Expand Down Expand Up @@ -174,8 +171,6 @@ Taplytics.track("Purchased", 180.50, {
Taplytics.track("Finished Tutorial", {
time_on_tutorial: 100
});


```


Expand Down Expand Up @@ -236,7 +231,6 @@ Taplytics.page("Product Listings", "Shirts", {
products_count: 150
});


```


Expand All @@ -262,7 +256,6 @@ Resets the user object and assumes the visitor is now anonymous. This can be use

Taplytics.reset();


```

---
Expand All @@ -286,7 +279,6 @@ Taplytics.propertiesLoaded(function() {
// properties have loaded
});


```

---
Expand Down Expand Up @@ -314,7 +306,6 @@ Taplytics.runningExperiments(function(expAndVars) {
//};
});


```

---
Expand Down Expand Up @@ -376,23 +367,4 @@ Taplytics.codeBlock("JS CodeBlock", function() {
// run your code here
});


```

---

### startNewSession

Usage: `Taplytics.startNewSession()`

Creates a new session for the user and fetches the new config data.

##### Example

```javascript

Taplytics.setUserAttributes({user_id: 'new_user!'})
Taplytics.startNewSession()


```
42 changes: 0 additions & 42 deletions START.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ To fully utilize the power of Taplytics.js, you simply have to:
| 2 | [Identify Users](#2-identify-users) |
| 3 | [Track Events](#3-track-events) |
| 4 | [Track Page Views](#4-track-page-views) |
| 5 | [Experiments](#5-experiments) |
| 6 | [Opt-In/Out](#6-opt-inout) |
| 7 | [Adobe Analytics Integration](#7-adobe-analytics-integration) |
| 8 | [CNAME Aliasing](#8-cname-aliasing) |

## 1A Synchronous script loading

Expand Down Expand Up @@ -231,41 +227,3 @@ function hasOptedOut() {

Adobe Analytics by default uses `s.t()` and `s.tl()` for tracking page views and link clicks. By setting `track_adobe_analytics` variable to true in `Taplytics.init` function, We inject our tracking code into the definitions of these functions. So whenever `s.t()` or `s.tl()` is called on the page, It first sends those events to Taplytics before sending them to Adobe Analytics.
By default, Taplytics assumes adobe analytics tracking variable to be `s`. If you use a custom variable, then make sure to provide that during taplytics initialization with `adobe_obj_name` variable.

### 8. CNAME Aliasing

To prevent adblocks from blocking requests to our api servers, you can setup a CNAME on your domain that points to our API domains:

`https://api.taplytics.com`
`https://ping.taplytics.com`

Once you have your CNAME setup, you can pass in as options to the sync script URL or as options in `Taplytics.init`.

```javascript

Taplytics.init("TOKEN", {
alias_host: {
api_host: 'https://api-alias.your-domain.com',
ping_host: 'https://ping-alias.your-domain.com'
}
});

```

```HTML

<script type="text/javascript">
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
const alias = {
api_host: 'https://api-alias.your-domain.com',
ping_host: 'https://ping-alias.your-domain.com'
}
const encodedAlias = encodeURIComponent(JSON.stringify(alias));
script.src = `https://js.taplytics.com/jssdk/{YOUR_TOKEN}.min.js?alias_host=${encodedAlias}`;
head.appendChild(script);
</script>


```
2 changes: 1 addition & 1 deletion taplytics.min.js

Large diffs are not rendered by default.

0 comments on commit bbd4a44

Please sign in to comment.