# Interactions in external file

**URL:** <https://forum.bricksbuilder.io/t/interactions-in-external-file/16275>\
**Category:** Feature Requests / Improvements\
**Created:** [October 18, 2023, 5:12pm UTC](https://forum.bricksbuilder.io/t/interactions-in-external-file/16275 "2023-10-18T17:12:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MartinWB](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/martinwb/32/22977_2.png) [@MartinWB](https://forum.bricksbuilder.io/u/MartinWB)\
**Post date:** [October 18, 2023, 5:12pm UTC](https://forum.bricksbuilder.io/t/interactions-in-external-file/16275/1 "2023-10-18T17:12:09Z")

</div>

What do you think about page-specific interactions loaded in external file(json)?

Let say

```auto
{
    "2d22, 2d23, 2d24": {
        "id": "wbreai",
        "trigger": "click",
        "target": "popup",
        "templateId": "5721",
        "action": "show"
    },
    "2d25": {
        "id": "uniqueId2",
        "trigger": "hover",
        "target": "element",
        "templateId": "1234",
        "action": "hide"
    },
    // more interactions
}

```

so our DOM may be like so

```auto
<div data-interaction-id="2d22">Element 1</div>
<div data-interaction-id="2d23">Element 2</div>
<div data-interaction-id="2d24">Element 3</div>
<div data-interaction-id="2d25">Element 4</div>
<!-- and so on-->

```

In this scenario interactions may be easily reused (no duplicates), json file cached and DOM will be cleaner…

What are your thoughts?
