I'm trying to write a widget plugin in Wordpress which creates a javascript tag and drops it in the footer of a page. I know I can use wp\_enqueue\_script to create this, no problem. But I need to pass a parameter from the widget settings to this script tag. 

Example:

`wp_enqueue_script( 'script-name', '/js/example.js' );`

will render a tag that looks something like this:

`<script type='text/javascript' src='/js/example.js'></script>`

What I want is to create a tag that looks like this:

`<script type='text/javascript' data-id='12345' src='/js/example.js'></script>`

where 12345 is passed in from the widget settings.

How do I do this?