Changeset 1532546
- Timestamp:
- 11/11/2016 09:39:13 PM (9 years ago)
- Location:
- callcap-webmatch/trunk
- Files:
-
- 4 edited
-
readme.md (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
webmatch-form.php (modified) (11 diffs)
-
webmatch.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
callcap-webmatch/trunk/readme.md
r1329277 r1532546 5 5 https://wordpress.org/plugins/callcap-webmatch/ 6 6 https://www.callcap.com/help/webmatch 7 https://www.callcap.com/help/webmatch-wordpress 7 8 8 9 ### Setup ### -
callcap-webmatch/trunk/readme.txt
r1344159 r1532546 3 3 Tags: call tracking, phone tracking, phone numbers 4 4 Requires at least: 4.0 5 Tested up to: 4. 4.16 Stable tag: 4. 4.15 Tested up to: 4.6.1 6 Stable tag: 4.6.1 7 7 License: GPL v2 8 8 License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html 9 9 10 Works with Webmatch by Callcap to associate pageviews with phone calls and dynamically switch out phone numbers withyour Webmatch phone numbers.10 Works with Webmatch by Callcap to associate pageviews with phone calls and dynamically change phone numbers on your Wordpress page using your Webmatch phone numbers. 11 11 12 12 == Description == … … 15 15 Webmatch allows a company to bridge the gap between basic web analytics and direct sales via phone calls. If a call leads to a sale, Webmatch can help you see where the initial visit came from, what ad campaign it may have run under, and what page the user was on when they called you. 16 16 17 At it 's most basic, Webmatch will simply associate recent calls to recent pageviews, but with Dynamic Number enabled, Webmatch can show unique phone numbers to visitors to more accurately track their statistics.17 At it\'s most basic, Webmatch will simply associate recent calls to recent pageviews, but with Dynamic Rotator enabled, Webmatch can show unique phone numbers to visitors to more accurately track their statistics. 18 18 19 19 == Installation == 20 In order for the Callcap Webmatch plugin to work, you must have Webmatch enabled on your Callcap account. More information can be found here: http s://www.callcap.com/help/webmatch/20 In order for the Callcap Webmatch plugin to work, you must have Webmatch enabled on your Callcap account. More information can be found here: http://www.callcap.com/help/webmatch/ 21 21 22 22 From the Wordpress admin panel, click "Plugins", search for "Callcap Webmatch", install the plugin, then click "Activate" 23 23 24 Full documentation located at https://www.callcap.com/help/webmatch-wordpress 25 24 26 == Changelog == 27 28 = 1.2 = 29 - Fancy new documentation! Find more at https://www.callcap.com/help/webmatch 30 - Removed "Instance Name" as it's no longer used. Using "Label" as a generic user-facing label going forward. 31 - Tested compatibility with Wordpress 4.6.1 32 - Savage! 25 33 26 34 = 1.1 = 27 35 - Major layout/design updates 28 - Allowed multiple dynamic numbers/campaigns per site29 - Enabled targeted CSS class for numbers.36 - Allowed multiple rotators/campaigns per site 37 - Enabled targeted CSS class for rotators. 30 38 - Added UTM Variable tracking 31 39 - Added UTM Search Term tracking … … 45 53 = 1.0.4 = 46 54 - Consolidating some terminology in the plugin 47 - Testing compat ability with Wordpress 4.4.155 - Testing compatibility with Wordpress 4.4.1 48 56 49 57 = 1.0.3 = -
callcap-webmatch/trunk/webmatch-form.php
r1329284 r1532546 7 7 // handle URL actions 8 8 switch ($_GET['action']) { 9 10 9 case "delete": 11 10 $id = $_GET['id']; … … 16 15 echo "<script>window.location.replace('".$safeURI."');</script>"; 17 16 break; 18 19 17 } 20 18 … … 72 70 73 71 <?php if ($campaign['phone_format']) { echo "<li><b>Phone Format:</b> ".$phoneFormat."</li>"; } ?> 74 <?php if ($campaign['instance_name']) { echo "<li><b>Instance Name:</b> ".$campaign['instance_name']."</li>"; } ?>75 72 <?php if ($campaign['instance_class']) { echo "<li><b>Instance Class:</b> ".$campaign['instance_class']."</li>"; } ?> 76 <?php if ($campaign['utm_tags']) { echo "<li><b> UTM Tags:</b> ".$campaign['utm_tags']."</li>"; } ?>77 <?php if ($campaign['utm_term_for_search']) { echo "<li><b>U TM Search Term:</b> ".$campaign['utm_term_for_search']."</li>"; } ?>73 <?php if ($campaign['utm_tags']) { echo "<li><b>Load UTM Parameters:</b> ".$campaign['utm_tags']."</li>"; } ?> 74 <?php if ($campaign['utm_term_for_search']) { echo "<li><b>Use UTM Search Term:</b> ".$campaign['utm_term_for_search']."</li>"; } ?> 78 75 <?php if ($campaign['pull_parameters']) { echo "<li><b>Pull Parameters:</b> ".$campaign['pull_parameters']."</li>"; } ?> 79 76 <?php if ($campaign['k']) { echo "<li><b>K:</b> ".$campaign['k']."</li>"; } ?> … … 93 90 <input type="hidden" name="callcap_campaigns[<?php echo $listIterator; ?>][campaign_id]" value="<?php echo $campaign['campaign_id']; ?>" /> 94 91 <input type="hidden" name="callcap_campaigns[<?php echo $listIterator; ?>][phone_format]" value="<?php echo $campaign['phone_format']; ?>" /> 95 <input type="hidden" name="callcap_campaigns[<?php echo $listIterator; ?>][instance_name]" value="<?php echo $campaign['instance_name']; ?>" />96 92 <input type="hidden" name="callcap_campaigns[<?php echo $listIterator; ?>][instance_class]" value="<?php echo $campaign['instance_class']; ?>" /> 97 93 <input type="hidden" name="callcap_campaigns[<?php echo $listIterator; ?>][utm_tags]" value="<?php echo $campaign['utm_tags']; ?>" /> … … 157 153 </select> 158 154 <span id='dynamic_options_"+newCampaignIterator+"' class='dynamicOptions callcapHide'> 159 <h4>Instance Name</h4>160 <input type='text' name='callcap_campaigns["+newCampaignIterator+"][instance_name]' value='' placeholder='Instance Name' />161 155 <p class='helpText'>No spaces</p> 162 156 <h4>Instance Class</h4> … … 203 197 </div> 204 198 205 206 199 </div> <!-- .campaignListContainer --> 207 200 </div> … … 226 219 jQuery("#dynamic_options_"+iteration).hide(); 227 220 jQuery("#campaign_id_input, #campaign_id_title").show(); 228 }) 221 }); 229 222 230 223 jQuery(".campaignListContainer").on("click", "label[for='dynamic']", function() { … … 233 226 jQuery("#dynamic_options_"+iteration).show(); 234 227 jQuery("#campaign_id_input, #campaign_id_title").show(); 235 }) 228 }); 236 229 237 230 // show or hide pull_parameters fields when the checkbox is clicked 238 231 jQuery(".campaignListContainer").on("click", "#manual_tagging", function() { 239 232 var iteration = jQuery(this).data('iteration'); 240 241 233 if(this.checked) { 242 234 jQuery("#manual_tagging_"+iteration).show(); … … 244 236 jQuery("#manual_tagging_"+iteration).hide(); 245 237 } 246 247 }) 238 }); 248 239 249 240 // expand the "help" section when a user is adding a dynamic number rotator … … 255 246 // Iterates based on the number of entries already in the main campaign array so we don't overwrite things 256 247 jQuery(".newCampaignButton").click(function() { 257 258 var newCampaignRowData = "<div id='newCampaignRow_"+newCampaignIterator+"' class='newCampaignRow'> <div class='newCampaign'> <div class='removeCampaignButton button button-primary' data-iteration='"+newCampaignIterator+"'>X</div> <div class='newCampaignCell'> <h4>Label</h4> <input type='text' name='callcap_campaigns["+newCampaignIterator+"][campaign_label]' value='' placeholder='Label' /> <h4>Campaign Type</h4> <label for='static' data-iteration='"+newCampaignIterator+"'> <input type='radio' id='static' class='' name='callcap_campaigns["+newCampaignIterator+"][campaign_type]' value='static' /> Static </label> <label for='dynamic' data-iteration='"+newCampaignIterator+"'> <input type='radio' id='dynamic' class='' name='callcap_campaigns["+newCampaignIterator+"][campaign_type]' value='dynamic' /> Dynamic </label> <h4 id='campaign_id_title' style='display:none;'>Campaign ID</h4> <input id='campaign_id_input' type='text' name='callcap_campaigns["+newCampaignIterator+"][campaign_id]' value='' placeholder='' style='display:none;' /> </div> <div class='newCampaignCell'> <h4>Phone Format</h4> <select name='callcap_campaigns["+newCampaignIterator+"][phone_format]'> <option value='dash'>555-555-5555</option> <option value='paren'>(555) 555-5555</option> </select> <span id='dynamic_options_"+newCampaignIterator+"' class='dynamicOptions callcapHide'> <h4>Instance Name</h4> <input type='text' name='callcap_campaigns["+newCampaignIterator+"][instance_name]' value='' placeholder='Instance Name' /> <p class='helpText'>No spaces</p> <h4>Instance Class</h4> <input type='text' name='callcap_campaigns["+newCampaignIterator+"][instance_class]' value='callcap_phone_number' placeholder='Instance Class' /> </span> </div> <div class='newCampaignCell'> <h4>Options</h4> <label for='utm_tags'> <input id='utm_tags' type='checkbox' name='callcap_campaigns["+newCampaignIterator+"][utm_tags]' /> UTM Tags </label> <label for='utm_term_for_search'> <input id='utm_term_for_search' type='checkbox' data-iteration='"+newCampaignIterator+"' name='callcap_campaigns["+newCampaignIterator+"][utm_term_for_search]' /> UTM Search Term </label> <label for='pull_parameters'> <input id='pull_parameters' type='checkbox' data-iteration='"+newCampaignIterator+"' name='callcap_campaigns["+newCampaignIterator+"][pull_parameters]' /> Pull Parameters </label> <label for='manual_tagging'> <input id='manual_tagging' type='checkbox' data-iteration='"+newCampaignIterator+"' name='manual_tagging' /> Manual Tagging </label> </div> <div id='manual_tagging_"+newCampaignIterator+"' class='newCampaignCell' style='display:none;'> <h4>Manual Tags</h4> <label>K <input type='text' name='callcap_campaigns["+newCampaignIterator+"][k]' value='' placeholder='K' /> </label> <label>C <input type='text' name='callcap_campaigns["+newCampaignIterator+"][c]' value='' placeholder='C' /> </label> <label>A <input type='text' name='callcap_campaigns["+newCampaignIterator+"][a]' value='' placeholder='A' /> </label> <label>P <input type='text' name='callcap_campaigns["+newCampaignIterator+"][p]' value='' placeholder='P' /> </label> </div> </div> </div>"; 248 var newCampaignRowData = "<div id='newCampaignRow_"+newCampaignIterator+"' class='newCampaignRow'> <div class='newCampaign'> <div class='removeCampaignButton button button-primary' data-iteration='"+newCampaignIterator+"'>X</div> <div class='newCampaignCell'> <h4>Label</h4> <input type='text' name='callcap_campaigns["+newCampaignIterator+"][campaign_label]' value='' placeholder='Label' /> <h4>Campaign Type</h4> <label for='static' data-iteration='"+newCampaignIterator+"'> <input type='radio' id='static' class='' name='callcap_campaigns["+newCampaignIterator+"][campaign_type]' value='static' /> Static </label> <label for='dynamic' data-iteration='"+newCampaignIterator+"'> <input type='radio' id='dynamic' class='' name='callcap_campaigns["+newCampaignIterator+"][campaign_type]' value='dynamic' /> Dynamic </label> <h4 id='campaign_id_title' style='display:none;'>Campaign ID</h4> <input id='campaign_id_input' type='text' name='callcap_campaigns["+newCampaignIterator+"][campaign_id]' value='' placeholder='' style='display:none;' /> </div> <div class='newCampaignCell'> <h4>Phone Format</h4> <select name='callcap_campaigns["+newCampaignIterator+"][phone_format]'> <option value='dash'>555-555-5555</option> <option value='paren'>(555) 555-5555</option> </select> <span id='dynamic_options_"+newCampaignIterator+"' class='dynamicOptions callcapHide'> <p class='helpText'>No spaces</p> <h4>Instance Class</h4> <input type='text' name='callcap_campaigns["+newCampaignIterator+"][instance_class]' value='callcap_phone_number' placeholder='Instance Class' /> </span> </div> <div class='newCampaignCell'> <h4>Options</h4> <label for='utm_tags'> <input id='utm_tags' type='checkbox' name='callcap_campaigns["+newCampaignIterator+"][utm_tags]' /> Load UTM Parameters </label> <label for='utm_term_for_search'> <input id='utm_term_for_search' type='checkbox' data-iteration='"+newCampaignIterator+"' name='callcap_campaigns["+newCampaignIterator+"][utm_term_for_search]' /> UTM Search Term </label> <label for='pull_parameters'> <input id='pull_parameters' type='checkbox' data-iteration='"+newCampaignIterator+"' name='callcap_campaigns["+newCampaignIterator+"][pull_parameters]' /> Pull Parameters </label> <label for='manual_tagging'> <input id='manual_tagging' type='checkbox' data-iteration='"+newCampaignIterator+"' name='manual_tagging' /> Manual Tagging </label> </div> <div id='manual_tagging_"+newCampaignIterator+"' class='newCampaignCell' style='display:none;'> <h4>Manual Tags</h4> <label>K <input type='text' name='callcap_campaigns["+newCampaignIterator+"][k]' value='' placeholder='K' /> </label> <label>C <input type='text' name='callcap_campaigns["+newCampaignIterator+"][c]' value='' placeholder='C' /> </label> <label>A <input type='text' name='callcap_campaigns["+newCampaignIterator+"][a]' value='' placeholder='A' /> </label> <label>P <input type='text' name='callcap_campaigns["+newCampaignIterator+"][p]' value='' placeholder='P' /> </label> </div> </div> </div>"; 259 249 jQuery(".newCampaignButton").before(newCampaignRowData); 260 250 jQuery(".newCampaignButton").html("Add Another Campaign"); 261 251 newCampaignIterator++; 262 263 252 }); 264 253 … … 273 262 jQuery("#newCampaignRow_"+iteration).empty(); 274 263 console.log("#newCampaignRow_"+iteration); 275 }) 264 }); 276 265 277 266 }); -
callcap-webmatch/trunk/webmatch.php
r1329277 r1532546 74 74 if ($campaign['campaign_type'] == "dynamic") { 75 75 echo " 76 var ".$campaign[' instance_name']." = new Webmatch({76 var ".$campaign['campaign_label']." = new Webmatch({ 77 77 rotate: '".$campaign['campaign_id']."', 78 78 phone_format: '".$campaign['phone_format']."', 79 instance_name: '".$campaign['instance_name']."',80 79 instance_class: '".$campaign['instance_class']."', 81 80 k: '".$campaign['k']."',
Note: See TracChangeset
for help on using the changeset viewer.