Sha256: eea32a180de14f2da15086db17f42db987fa9838c8f435448764e0e3c4acc15f

Contents?: true

Size: 1.17 KB

Versions: 21

Compression:

Stored size: 1.17 KB

Contents

<% unless Rails.application.secrets.widget_api_key.nil? %>
    <script  defer>
        <% if current_user.present? %>
            window.NeetoWidgetUserIdentity = {
                email: "<%= current_user.email %>"
            }
            window.NeetoReplayWidgetSessionContext = {
                user_id: "<%= current_user.id %>",
                sign_in_count: "<%= current_user.sign_in_count %>",
                name: ["<%= current_user.first_name %>", "<%= current_user.last_name %>"]
            }
        <% end %>

        function handleWidgetScriptOnLoad() {
            window.NeetoChat = {
                visibleOnMount: false,
                triggerAction: "hide"
            }
            embedNeetoWidget({
                environment: "<%= NeetoCommonsBackend::Helpers.get_neeto_widget_environment %>",
                apiKey: "<%= Rails.application.secrets.widget_api_key %>",
                neetoChangelogOptions: {
                    elementId: "neetochangelog-trigger",
                },
            });
        }
    </script>

    <script src="<%= NeetoCommonsBackend::Helpers.build_neeto_widget_script_url %>" onload="handleWidgetScriptOnLoad()"></script>
<% end %>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.109 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.108 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.107 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.106 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.105 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.104 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.103 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.102 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.101 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.100 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.99 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.98 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.97 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.96 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.95 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.94 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.93 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.92 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.91 app/views/shared/_neeto_widget.html.erb
neeto-commons-backend-1.0.90 app/views/shared/_neeto_widget.html.erb