User Tools

Site Tools


contact_widgets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
contact_widgets [2018/02/15 19:33]
brittany [Adding a contact widget to your external Site]
contact_widgets [2018/02/15 19:56] (current)
brittany [Adding a contact widget to your external Site]
Line 1: Line 1:
 +======Purpose=======
 +
 +We know our customers are often power users that have several websites, and not all of them are powered by Real Geeks (yet!)
 +
 +Customers would often ask for the ability to send leads from their other sites into our lead manager. ​ So, we have created a widget that will let you embed contact links in your other sites that will send contact requests into the lead manager.
 +
 +This widget uses the asynchronous method of javascript, similar to the new method that google analytics uses.  This ensures that our widget will not impact the speed of your own site.
 +
 +======Adding a contact widget to your external Site======
 +
 +Paste the following code just before the </​head>​ tag on your site.  **You will need to replace WWW.YOURSITEHERE.COM with the URL of your Real Geeks site**.:
 +
 +
 +  <script type="​text/​javascript">​
 +    var _rgq = _rgq || [];
 +    _rgq.push(['​_setSecure',​ true]);
 +    _rgq.push(['​_setDomain','​WWW.YOURSITEHERE.COM'​]);​
 +    (function() {
 +       var rg = document.createElement('​script'​);​ rg.type = '​text/​javascript';​ rg.async = true;
 +       ​rg.src = '//​widgets.realgeeks.com/​static/​js/​rg.min.js';​
 +       var s = document.getElementsByTagName('​script'​)[0];​ s.parentNode.insertBefore(rg,​ s);
 +     })();
 +  </​script>​
 +
 +The line, **_rgq.push(['​_setSecure',​ true]);**, needs to be added only if your site uses SSL (has https in the site url).
 +
 +Now, you can use the following javascript trigger anywhere on your page to open the contact form:
 +<code javascript>​
 +_rgq.push(['​_popupContact'​]);​
 +</​code>​
 +
 +For example, here is a button that pops up the contact form:
 +
 +<code html>
 +<button onclick="​_rgq.push(['​_popupContact'​])">​Contact Us</​button>​
 +</​code>​
 +
 +====Demo====
 +This is what it looks like (but you can style it however you want):
 +
 +<​html>​
 +    <script type="​text/​javascript">​
 +        var _rgq = _rgq || [];
 +        _rgq.push(['​_setDomain','​demo.realgeeks.com'​]);​
 +        (function() {
 +           var rg = document.createElement('​script'​);​ rg.type = '​text/​javascript';​ rg.async = true;
 +           ​rg.src = '​http://​widgets.realgeeks.com/​static/​js/​rg.js';​
 +           var s = document.getElementsByTagName('​script'​)[0];​ s.parentNode.insertBefore(rg,​ s);
 +         })();
 +    </​script>​
 +</​code>​
 +<button onclick="​_rgq.push(['​_popupContact'​])">​Contact Us</​button>​
 +</​html>​
  
contact_widgets.txt ยท Last modified: 2018/02/15 19:56 by brittany