<script>
// @see https://docs.headwayapp.co/widget for more configuration options.
var HW_config = {
selector: ".CHANGE_THIS", // CSS selector where to inject the badge
account: "your_account_id"
}
</script>
<script async src="https://cdn.headwayapp.co/widget.js"></script>
It asks for a CSS selector but trying to put the ID element in the code does not work.
The selector is the element where you want widget to show.
I guess that you can use item ID Attribute and use the same thing that you have set there.
For example, Create a group and set ID Attribute. if you use headway as attribute, enter #headway to replace “.change_this”
I´ve just tried to create a group an in the ID I put “headway”, inserted the code in “Settings > Scripts/meta tags in header” where I changed the “.change_this” by “#headway” and it´s not working.
<script>
// @see https://docs.headwayapp.co/widget for more configuration options.
var HW_config = {
selector: "#headway", // CSS selector where to inject the badge
account: "my_account_id"
}
</script>
<script async src="https://cdn.headwayapp.co/widget.js"></script>
I’m doing some test and I see that if you put it in page header, this won’t work. The page header is generated too fast and the element doesn’t exist.
I added the script to an HTML element. The element is found (you can always set the html to be visible only when the “target” element is visible to be sure).
The dev console show me the correct behavior but nothing show. But the “hw_badge” is added to the element.