PageSourceSearch

https://www.svenskaalarm.se/wp-content/plugins/intercom-telephone-…ntercom-to-datalayer-js-script.js?ver=7.1.2

js svenskaalarm.se collected 2026-09-24 12:30:13 UTC 1,810 bytes, 71 lines download raw bytes

1
2
3/*
4
5app_id = "1973100"
6key = "eeb735f0b3c714b016b6"
7secret = "96567f2e283b876b0b92"
8cluster = "eu"
9
10*/
11
12document.addEventListener('DOMContentLoaded', () => {
13	
14	var eventSourceSetup = false; 
15	      
16    // Listen for when Intercom shows
17    Intercom('onShow', function(something) {
18        
19
20    });
21    
22    Intercom('onUnreadCountChange', (unreadCount) => {
23        
24        var visitorID = window.Intercom("getVisitorId");
25        
26        if (visitorID && eventSourceSetup === false) {
27            
28            eventSourceSetup = true;
29            
30            console.log('setup pusher using visitorID ', visitorID);
31            
32            var pusher = new Pusher('eeb735f0b3c714b016b6', {
33              cluster: 'eu',
34              enabledTransports: ['ws', 'wss'], // Ensure WebSocket is enabled
35              logToConsole: true
36            });
37            
38            pusher.connection.bind('connected', () => {
39                console.log('✅ Successfully connected to Pusher 666');
40  
41              
42                var channel = pusher.subscribe(visitorID);
43                channel.bind('phone', function(data) {
44                  
45                  if (data.telephone) {
46                      
47                      console.log('pusher data.telephone', data.telephone);
48                      
49                    window.dataLayer.push({
50                      'userPhone': data.telephone,
51                      'event': 'phone-captured-from-intercom'
52                    });
53                    
54                  }
55
56                });
57            
58            });
59            
60            pusher.connection.bind('error', function(err) {
61              console.error('❌ Pusher connection error:', err);
62            });
63            
64            
65        }
66        
67    });
68    
69
70        
71});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.