Tutorial

Using Granify Functions

As you go through your Granify installation, you will be required to call several Granify functions to provide it data. There's multiple ways to call Granify functions.

The snippet you installed in the previous step has one job: load the main Granify script. This means that it may take some time before the required functions exist on the Granify object. Fortunately, Granify has a system to safely queue requests to be executed immediately after Granify is loaded. To do this, you simply call Granify itself as a function, with the first parameter being the name of the function you want to run. For example:

Granify('trackPageView', {
  page_type: 'home'
});

It is encouraged to always use this safe method of calling functions instead of using direct calls (ex. Granify.trackPageView).

Next: Implementing Track Order