@@ -0,0 +1,1952 @@
+package org.sagebionetworks.web.client.widget.pendo;%0A%0Aimport static org.sagebionetworks.web.client.ClientProperties.PENDO_SDK_JS;%0A%0Aimport org.sagebionetworks.web.client.resources.ResourceLoader;%0A%0Aimport com.google.gwt.user.client.rpc.AsyncCallback;%0Aimport com.google.inject.Inject;%0A%0A/**%0A * Wrapper around the Pendo library%0A * @author jayhodgson%0A *%0A */%0Apublic class PendoSdk %7B%0A%09ResourceLoader resourceLoader;%0A%09%0A%09@Inject%0A%09public PendoSdk(%0A%09%09%09ResourceLoader resourceLoader%0A%09%09%09) %7B%0A%09%09this.resourceLoader = resourceLoader;%0A%09%7D%0A%0A%09private void initJs(final AsyncCallback%3CVoid%3E callback) %7B%0A%09%09if (!resourceLoader.isLoaded(PENDO_SDK_JS)) %7B%0A%09%09%09resourceLoader.requires(PENDO_SDK_JS, callback);%0A%09%09%7D else %7B%0A%09%09%09callback.onSuccess(null);%0A%09%09%7D%0A%09%7D%0A%0A%09public void initialize(final String userId, final String email) %7B%0A%09%09initJs(new AsyncCallback%3CVoid%3E() %7B%0A%09%09%09@Override%0A%09%09%09public void onSuccess(Void result) %7B%0A%09%09%09%09_initialize(userId, email);%0A%09%09%09%7D%0A%0A%09%09%09@Override%0A%09%09%09public void onFailure(Throwable caught) %7B%0A%09%09%09%7D%0A%09%09%7D);%0A%09%7D%0A%0A%09private static native void _initialize(%0A%09%09%09String userId,%0A%09%09%09String synapseEmail) /*-%7B%0A%09%09// Call this whenever information about your visitors becomes available%0A%09    // Please use Strings, Numbers, or Bools for value types.%0A%09    $wnd.pendo.initialize(%7B%0A%09      visitor: %7B%0A%09        id: userId,   // Required if user is logged in%0A%09        email: synapseEmail// Optional%0A%09        // role:         // Optional%0A%09%0A%09        // You can add any additional visitor level key-values here,%0A%09        // as long as it's not one of the above reserved names.%0A%09      %7D,%0A%09%0A%09      account: %7B%0A%09        // id:           'ACCOUNT-UNIQUE-ID' // Highly recommended%0A%09        // name:         // Optional%0A%09        // planLevel:    // Optional%0A%09        // planPrice:    // Optional%0A%09        // creationDate: // Optional%0A%09%0A%09        // You can add any additional account level key-values here,%0A%09        // as long as it's not one of the above reserved names.%0A%09      %7D%0A%09    %7D);%0A%09%7D-*/;%0A%7D

add pendosdk