Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Main script

Place this script on all public pages of the site inside the <head> element.

Warning

Don't forget to replace the %YOUR_STORE_KEY% text with the current store key from your PersonaClick account.

Code Block
languagejs
themeFadeToGrey
<script>
(function(){
    window.personaclick=window.personaclick||function(){(window.personaclick.q=window.personaclick.q||[]).push(arguments)};
    var c="//cdn.personaclick.com",v="/v3.js",s={link:[{href:c,rel:"dns-prefetch"},{href:c,rel:"preconnect"},{href:c+v,rel:"preload",as:"script"}],script:[{src:c+v,async:""}]};
    Object.keys(s).forEach(function(c){s[c].forEach(function(d){var e=document.createElement(c),a;for(a in d)e.setAttribute(a,d[a]);document.head.appendChild(e)})});
})();
personaclick("init", "%YOUR_STORE_KEY%");
</script>

Additional Features

The initialization method has additional features - callback functions for success and error states.

CocoaPods

PersonaClick SDK is available through CocoaPods. To install it, simply add the following line to your Podfile:

Name

Type

Requirement

Description

store_keystringrequiredThe current store key from the PersonaClick account.successfunctionoptionallyThe function will be executed after successful initialization.errorfunctionoptionallyThe function will be executed after unsuccessful initialization (any Personaclick API response other than 200).Example of use
Code Block
languagejs
themeFadeToGrey
personaclick("init", store_key, success, error);

Initialization parameters

pod 'PersonaClick'

Swift Package Manager

If you are using Xcode 11 or later:

  1. Click: File > Swift Packages > Add Package Dependency...
  2. Specify the git URL for PersonaClick SDK repo.
Code Block
languagejstext
themeFadeToGrey
personaclick("init", "c6d2fe5fdca0c8e51d10b07523bc07", function() {
    // Do something in case of successful initialization
    console.log("The PersonaClick initialization was successful");
}, function() {
    // Do something in case of unsuccessful initialization
    console.log("The PersonaClick initialization was unsuccessful");
});https://github.com/PersonaClick/ios-sdk.git



Column

Page Navigation

Table of Contents
maxLevel2

classpersonaclick-fixed-position

indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel = "installation_mobile"