Create, Update, and Delete Users

Last Updated 2021-06-16

  • ID: User ID of your user that is the unique identifier in your application – Field is required
  • First Name: First name of your user – Field is required
  • Last Name: Last name of your user – Field is optional
  • Email: Email of your user – Field is required
  • Avatar URL: URL of the profile picture of your user – Field is optional
  • Properties: Customizable users attributes for each user. Multiple are supported, and optional


Placed Directly

If you're placing the script directly within your website or application, use this:


<script id="cloudmattr-script" async src="https://cloudmattr.cloudmattr.com/packs/cloudmattr.js?v=1.1.1"></script>
<script type="text/javascript">
  (function() {
    var script = document.querySelector("#cloudmattr-script");
    script.addEventListener('load', function() {
      Cloudmattr.init("pk_XXXxxXXxXxXXXxxxxXXxxxXx");
      Cloudmattr.user('123456', {
        first_name: 'Michael',
        last_name: 'Scott',
        email: 'mscott@dundermifflin.com',
        properties: {
          'title': 'Regional Manager',
          'subscription_name': 'Pro Plan'
        }
      });
    });
  })();
</script>


Placed in Tag Manager

If using Google Tag Manager (or another tag management platform), use this:


<script src="https://cloudmattr.cloudmattr.com/packs/cloudmattr.js?v=1.1.1"></script>
<script type="text/javascript">
  (function() {
    Cloudmattr.init("pk_XXXxxXXxXxXXXxxxxXXxxxXx");
    Cloudmattr.user('123456', {
      first_name: 'Michael',
      last_name: 'Scott',
      email: 'mscott@dundermifflin.com'
      properties: {
        'title': 'Regional Manager',
        'subscription_name': 'Pro Plan'
      }
    });
  })();
</script>



  • Table of Contents

Was this page helpful? Yes No
2021 © Powered by Cloudmattr