API

Below are some useful JavaScript functions that will allow you to create more targeted notifications, which creates a better experience for your subscribers
analysis

To track attributes on a user (for instance, store their first name), call this JavaScript method:

_at.track("attribute", {attributes} );

We can use this to store a single attribute, like a user’s first name, like so:

_at.track("attribute", {
  "first_name":"Joe"
});

Or we can use it to store multiple attributes, like a user’s first name, age, and favorite animal, like so:

_at.track("attribute", {
  "first_name":"Joe",
  "age":"42",
  "favorite_animal":"Ring-tailed lemur"
});

If we want to track events on a user, we would use:

_at.track("event", {category, action, label, value} );

Be aware that while using the _at.track method to track an “event”, the category and action parameters are required, whereas the label and value parameters are optional.

For example, let’s say that you wanted to track an event. Any time a user clicks any blog post on your site, you may want to use the following:

_at.track("event", {
  category: "Link", 
  action: "Clicked",
});

And, let’s say that a user is on our site, and they clicked on a button that links to an article on our blog site. We could call the following script, which might refer to your blog’s numeric post ID:

_at.track("event", {
  category: "Link", 
  action: "Clicked", 
  label: "Blog", 
  value: "4567"
});

This is incredibly useful because we can segment users in useful ways, such as:

  • Users on our website who Clicked any Links
  • Users on our website who Clicked specifically any Blog Links
  • Users on our website who Clicked very specifically a Link to the Blog post with an ID of 4567
analysis

OR… Just Have PUSHPROS Do It For You