Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!––
- OfflineKPI.com V1.0 CODE START
- 1. Google analytics tracking script must be on page
- 2. If you already use jQuery, remove our
- 3. If you already use sweet alert, remove ours
- ––>
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert-dev.min.js"></script>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.css" />
- <script type="text/javascript" src="https://offlinekpi.com/js/offlinekpi.js">
- <script>
- $(document).ready(function(e){
- $( "#target" ).submit(function( event ) {
- //var api_key = $("#api_key").val();
- //var form_id = $("#form_id").val();
- //var account_id = $("#account_id").val();
- var ga_clientId = $("#ga_clientId").val();
- $.ajax({
- crossDomain: true,
- url: "http://offlinekpi.com/callback/lead_import.php?action=import_lead&",
- type: "GET",
- data: {
- api_key: 'wsder-51588-aswed',
- form_id: 5,
- account_id: 1,
- ga_clientId: ga_clientId,
- lead_type_id:
- },
- dataType: "jsonp",
- jsonpCallback: 'callback',
- contentType: "application/json",
- crossDomain: true,
- success: function(data) {
- if (data.success == 1){
- swal("Thanks", "We Will contact you Soon", "success");
- $("#target").hide();
- }
- },
- error: function(data){
- console.log("error", data);
- }
- });
- event.preventDefault();
- });
- });
- </script>
- <form id="target">
- <input type="hidden" id="ga_clientId" value="">
- <table>
- <tr>
- <td colspan="2" align="right"> <input type="submit" value="Save" > </td>
- </tr>
- </table>
- </form>
- <!–– OfflineKPI.com V1.0 CODE END -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement