Handling virtual page changes

If your site "changes pages" without actually going to a new URL, using, for example, AJAX, you can inform Chartbeat about these new pages by using the virtualPage() function.

For example, if the page the user is loading is http://example.com/page1, but the page changes to the virtual page http://example.com/page2, you should call this:

pSUPERFLY.virtualPage("/page2", "New Title");

The second parameter is the title for the new virtual page and is optional.

By default, pSUPERFLY does not include parameters for section and author variables. However, you can include a line of code to set the author and/or section before the line of code that includes pSUPERFLY. This will look like:

_sf_async_config.sections=“New Section”; _sf_async_config.authors=“New Author”; pSUPERFLY.virtualpage("/newpath, “New title”););

For more information on Virtual Page Changes check out our Getting Started Guide.

Here are some ways to get in touch.