As part of API implementation of Queue-it framework, I need to add extra custom attribute data-queueit-c
into script
tag, e.g.
<script
data-queueit-c="MyClientID"
type="text/javascript"
src="//static.queue-it.net/script/queueconfigloader.min.js">
</script>
I'm aware you can add other attributes such as defer
, however this one is custom.
I've tried the following code using drupal_add_js
, but without luck:
drupal_add_js('//static.queue-it.net/script/queueconfigloader.min.js',
[
'type' => 'external',
'data-queueit-c' => 'MyClientID',
]);
How this can be achieved?