Asset: Ungating Content for Known Users in Marketing Automation Platforms (MAP)

Modified on Fri, 26 Jul at 6:53 AM

Q. Can I un-gate content if I know the visitor is a known contact in my marketing automation platform (MAP)?

A.  The short answer is Yes. That said, Hushly won't know if a visitor is a contact in your MAP. If you know the visitor is a contact in your MAP, you can configure a javascript function, with your own custom logic, that tells Hushly if the visitor is a known MAP contact so that Hushly can un-gate the content for the visitor. 


JS Code:

<script type="text/javascript">
window.getHushlyConfig = function (callback) {
let result = {ungated: false};
// TODO: Implement your own logic to update the result.ungated flag,
// result.ungated should be set to true for known visitors
callback(result);
};
</script>

If the result is set to ungated: true then the asset will be ungated. If the result is set to ungated: false then the asset will be gated.


PLEASE NOTE: While you can enable the un-gating of assets to known users in your MAP, your account will be charged (based on your pricing plan) for every download of un-gated content.


How to insert the custom Javascript for Experiences

Method #1  Google Tag Manager

Google Tag Manager, is a great way to manage all the additional JavaScript, or "tags" and "tracking pixels" to your website without involving development resources.


You can configure the above JavaScript function by creating a Tag in Google Tag Manager. Make sure this tag triggers on all the web pages where the Hushly experiences are configured.


Method #2  Manual

Insert the above JavaScript function in the <head> tag of the HTML on the WebPage where the Hushly experiences are configured.


How to insert the custom Javascript for a Hub

Insert the JS Code in the Hub > Custom Code > Click New Custom Code button > Fill in the Fields provided and add the Code in the space provided. 

To learn more on How to add a custom code to your V3 Hub, click here.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article