Adding HubSpot Tracking Code

This is an optional, account-level feature that admins can enable. Inserting your HubSpot Tracking Code enables CloudFiles to associate the views to your HubSpot cookie and provides a deeper layer of integration with the marketing & sales hub.

HubSpot provides a tracking code that can be inserted on externally hosted pages so that tracking of those pages can be obtained in HubSpot.

This feature is only available on Enterprise Plans, since it requires white labeling of your domain. 

Owing to our integration-first philosophy, we provide our HubSpot users a way to insert their HubSpot tracking code on their document viewer pages (pages that open when you access a CloudFiles link)

Inserting your HubSpot tracking code can enable you to

  1. Insert your chat widget on your documents
  2. Put a Smart ID Wall that only asks for email if they are not already created as a contact in your HubSpot
  3. Associate old contact activity with the view thus giving you full visibility of timeline activity before the contact submitted their email in CloudFiles 
  4. Track CloudFiles page views & UTM parameters in HubSpot

How to enable this feature?

HubSpot - tracking code activation

Go to settings > Integrations. Then toggle "Enable HubSpot tracking code" to enable this feature. You must be the admin of the the CloudFiles account.

If you face any issues, reach out to us using the chat at bottom right or simply email us at

Adding HubSpot Chat Widget

Once the feature has been enabled, you can insert your HubSpot Chat widget on your documents by adding the "" domain (or your whitelabelled domain) into your Chatflow target settings. This is covered in the illustration below -


Once you have added the CloudFiles domain to the target list, your HubSpot Chat Bubble should immediately show up on your CloudFiles links.

Smart ID Wall

Once the feature has been enabled, all of your soft-gated content automatically starts using a smart ID wall. This ID wall only shows up if the stored HubSpot cookie does not already have an email associated to it. Thus, if you have asked your prospects for their email previously using a HubSpot form, CloudFiles will not ask for that information again.

Associate Old Activity

Once your HubSpot tracking code is inserted on the CloudFiles viewer, any emails entered or analytics gathered is automatically associated to the HubSpot cookie. Thus any old web-activity that was also associated with the cookie is automatically associated to this new CloudFiles activity.

This gives you a more wholesome picture of prospect activity.

Track Page views & UTM parameters

Since your HubSpot tracking code is now tracking CloudFiles pages as well, the analytics activity will also show up as "Page Views" in HubSpot timelines. Moreover, any UTM parameters you associate with your URLs are also passed and tracked in HubSpot.

Screenshot 2022-02-03 211815

Screenshot 2022-01-28 at 6.28.17 PM

If you have questions, chat with us.