Changeset 1050283
- Timestamp:
- 12/20/2014 02:25:15 PM (11 years ago)
- Location:
- gravity-forms-google-analytics-event-tracking/trunk
- Files:
-
- 13 edited
-
README.txt (modified) (2 diffs)
-
gravity-forms-event-tracking.php (modified) (1 diff)
-
includes/class-gravity-forms-event-tracking.php (modified) (4 diffs)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/AbstractTracking.php (modified) (2 diffs)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/App/Event.php (modified) (2 diffs)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/App/Screen.php (modified) (2 diffs)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Ecommerce/Item.php (modified) (3 diffs)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Ecommerce/Transaction.php (modified) (4 diffs)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Event.php (modified) (1 diff)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Exception.php (modified) (1 diff)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Page.php (modified) (2 diffs)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Social.php (modified) (1 diff)
-
includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/User/Timing.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gravity-forms-google-analytics-event-tracking/trunk/README.txt
r1045872 r1050283 4 4 Requires at least: 3.5.2 5 5 Tested up to: 4.1 6 Stable tag: 1.5. 26 Stable tag: 1.5.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 == Changelog == 82 82 83 = 1.5.3 = 84 * Ensured page title and location are properly being sent to Google 85 83 86 = 1.5.2 = 84 87 * Hotfix for PHP strict standards warning -
gravity-forms-google-analytics-event-tracking/trunk/gravity-forms-event-tracking.php
r1045872 r1050283 11 11 * Plugin URI: https://wordpress.org/plugins/gravity-forms-google-analytics-event-tracking/ 12 12 * Description: Add Google Analytics event tracking to your Gravity Forms with ease. 13 * Version: 1.5. 213 * Version: 1.5.3 14 14 * Author: Nathan Marks 15 15 * Author URI: http://www.nvisionsolutions.ca -
gravity-forms-google-analytics-event-tracking/trunk/includes/class-gravity-forms-event-tracking.php
r1045872 r1050283 14 14 15 15 class Gravity_Forms_Event_Tracking extends GFAddOn { 16 protected $_version = "1.5. 2";16 protected $_version = "1.5.3"; 17 17 protected $_min_gravityforms_version = "1.8.20"; 18 18 … … 145 145 */ 146 146 public function track_form_after_submission( $entry, $form ) { 147 147 global $post; 148 148 // Temporary until Gravity fix a bug 149 $entry = GFAPI::get_entry( $entry['id'] ); 150 151 // We need to check if this form is using paypal standard before we push a conversion. 152 if ( class_exists( 'GFPayPal' ) ) { 153 $paypal = GFPayPal::get_instance(); 154 155 // See if a PayPal standard feed exists for this form and the condition is met. 156 // If it is we need to save the GA cookie to the entry instead for return from the IPN 157 if ( $feed = $paypal->get_payment_feed( $entry ) && $paypal->is_feed_condition_met( $feed, $form, $entry ) ) { 158 gform_update_meta( $entry['id'], 'ga_cookie', $_COOKIE['_ga'] ); 159 return; 160 } 161 } 149 // $entry = GFAPI::get_entry( $entry['id'] ); 150 151 // Set some vars to send to GA 152 $ga_cookie = $_COOKIE['_ga']; 153 $document_location = 'http' . ( isset( $_SERVER['HTTPS'] ) ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'] . '/' . $_SERVER['REQUEST_URI']; 154 $document_title = get_the_title( $post ); 155 156 $ga_event_vars = array( 157 'ga_cookie' => $_COOKIE['_ga'], 158 'document_location' => $document_location, 159 'document_title' => $document_title 160 ); 161 162 gform_update_meta( $entry['id'], 'ga_event_vars', maybe_serialize( $ga_event_vars ) ); 162 163 163 164 // Push the event to google … … 178 179 } 179 180 180 // Fetch the cookie we saved previously and set it into the cookie global181 // The php analytics library looks for this182 $_COOKIE['_ga'] = gform_get_meta( $entry['id'], 'ga_cookie' );183 184 181 $form = GFFormsModel::get_form_meta( $entry['form_id'] ); 185 182 … … 201 198 202 199 // Init tracking object 203 $this->tracking = new \Racecore\GATracking\GATracking( apply_filters( 'gform_ua_id', $this->ua_id, $form ), false );200 $this->tracking = new \Racecore\GATracking\GATracking( apply_filters( 'gform_ua_id', $this->ua_id, $form ), true ); 204 201 $event = new \Racecore\GATracking\Tracking\Event(); 202 203 // get some stored vars 204 $ga_event_vars = maybe_unserialize( gform_get_meta( $entry['id'], 'ga_event_vars' ) ); 205 206 // Set some defaults 207 $event->setDocumentLocation( $ga_event_vars['document_location'] ); 208 $event->setDocumentTitle( $ga_event_vars['document_title'] ); 209 210 // Override this in case coming from paypal IPN 211 $_COOKIE['_ga'] = $ga_event_vars['ga_cookie']; 205 212 206 213 // Get event defaults -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/AbstractTracking.php
r1045331 r1050283 20 20 abstract class AbstractTracking 21 21 { 22 // document referrer 23 /** @var String */ 24 private $documentReferrer; 25 26 // campaign 27 /** @var String */ 28 private $campaignName, $campaignSource, $campaignMedium, $campaignContent, $campaignID, $campaignKeyword; 29 30 // adwords id 31 /** @var String */ 32 private $adwordsID; 33 34 // display ads id 35 /** @var String */ 36 private $displayAdsID; 37 38 // screen resolution 39 /** @var String */ 40 private $screenResolution; 41 42 // viewport size 43 /** @var String */ 44 private $viewportSize; 45 46 // document encoding 47 /** @var String */ 48 private $documentEncoding; 49 50 // screen colors 51 /** @var String */ 52 private $screenColors; 53 54 // user language 55 /** @var String */ 56 private $userLanguage; 57 58 // java enabled 59 /** @var boolean|string */ 60 private $javaEnabled = null; 61 62 // flash version 63 /** @var String */ 64 private $flashVersion; 65 66 // document location 67 /** @var String */ 68 private $documentLocation; 69 70 // document host 71 /** @var String */ 72 private $documentHost; 73 74 // document path 75 /** @var String */ 76 private $documentPath; 77 78 // document title 79 /** @var String */ 80 private $documentTitle; 81 82 // app name 83 /** @var String */ 84 private $appName; 85 86 // app version 87 /** @var String */ 88 private $appVersion; 89 90 // experiment id 91 /** @var String */ 92 private $experimentID; 93 94 // experiment variant 95 /** @var String */ 96 private $experimentVariant; 97 98 // content description 99 /** @var String */ 100 private $contentDescription; 101 102 // link id 103 /** @var String */ 104 private $linkID; 105 106 // custom dimensions 107 /** @var Array */ 108 private $customDimension = array(); 109 110 // custom metric 111 /** @var Array */ 112 private $customMetric = array(); 113 114 // productId 115 /** @var string */ 116 private $productId; 22 117 23 118 /** … … 26 121 * @return array 27 122 */ 28 abstract public function getPaket(); 29 123 abstract public function createPackage(); 124 125 /** 126 * Returns the Paket for Event Tracking 127 * 128 * @return array 129 * @throws \Racecore\GATracking\Exception\MissingTrackingParameterException 130 * @deprecated 131 */ 132 public function getPaket() 133 { 134 return $this->createPackage(); 135 } 136 137 /** 138 * @return array 139 */ 140 public function getPackage() 141 { 142 $package = array_merge($this->createPackage(), array( 143 // campaign 144 'cn' => $this->getCampaignName(), 145 'cs' => $this->getCampaignSource(), 146 'cm' => $this->getCampaignMedium(), 147 'ck' => $this->getCampaignKeyword(), 148 'cc' => $this->getCampaignContent(), 149 'ci' => $this->getCampaignID(), 150 151 // other 152 'dr' => $this->getDocumentReferrer(), 153 'gclid' => $this->getAdwordsID(), 154 'dclid' => $this->getDisplayAdsID(), 155 156 // system info 157 'sr' => $this->getScreenResolution(), 158 'sd' => $this->getScreenColors(), 159 'vp' => $this->getViewportSize(), 160 'de' => $this->getDocumentEncoding(), 161 'ul' => $this->getUserLanguage(), 162 'je' => $this->getJavaEnabled(), 163 'fl' => $this->getFlashVersion(), 164 165 // Content Information 166 'dl' => $this->getDocumentLocation(), 167 'dh' => $this->getDocumentHost(), 168 'dp' => $this->getDocumentPath(), 169 'dt' => $this->getDocumentTitle(), 170 'cd' => $this->getContentDescription(), 171 'linkid' => $this->getLinkID(), 172 173 // app tracking 174 'an' => $this->getAppName(), 175 'av' => $this->getAppVersion(), 176 177 // enhanced e-commerce 178 179 180 181 // content experiments 182 'xid' => $this->getExperimentID(), 183 'xvar' => $this->getExperimentVariant(), 184 )); 185 186 $package = $this->addCustomParameters($package); 187 188 // remove all unused 189 $package = array_filter($package, 'strlen'); 190 191 return $package; 192 } 193 194 /** 195 * @param array $package 196 * @return array 197 */ 198 private function addCustomParameters( Array $package ) 199 { 200 // add custom metric params 201 foreach( $this->customMetric as $id => $value ) 202 { 203 $package['cm' . (int) $id ] = $value; 204 } 205 206 // add custom dimension params 207 foreach( $this->customDimension as $id => $value ) 208 { 209 $package['cd' . (int) $id ] = $value; 210 } 211 212 return $package; 213 } 214 215 /** 216 * @param null $id 217 * @param $value 218 */ 219 public function setCustomDimension($id = null, $value) 220 { 221 $this->customDimension[$id] = $value; 222 } 223 224 /** 225 * @param null $id 226 * @param $value 227 */ 228 public function setCustomMetric($id = null, $value) 229 { 230 $this->customMetric[$id] = $value; 231 } 232 233 /** 234 * @param String $contentDescription 235 */ 236 public function setContentDescription($contentDescription) 237 { 238 $this->contentDescription = $contentDescription; 239 } 240 241 /** 242 * @return String 243 */ 244 public function getContentDescription() 245 { 246 return $this->contentDescription; 247 } 248 249 /** 250 * @param String $linkID 251 */ 252 public function setLinkID($linkID) 253 { 254 $this->linkID = $linkID; 255 } 256 257 /** 258 * @return String 259 */ 260 public function getLinkID() 261 { 262 return $this->linkID; 263 } 264 265 /** 266 * @param String $adwordsID 267 */ 268 public function setAdwordsID($adwordsID) 269 { 270 $this->adwordsID = $adwordsID; 271 } 272 273 /** 274 * @return String 275 */ 276 public function getAdwordsID() 277 { 278 return $this->adwordsID; 279 } 280 281 /** 282 * @param String $appName 283 */ 284 public function setAppName($appName) 285 { 286 $this->appName = $appName; 287 } 288 289 /** 290 * @return String 291 */ 292 public function getAppName() 293 { 294 return $this->appName; 295 } 296 297 /** 298 * @param String $appVersion 299 */ 300 public function setAppVersion($appVersion) 301 { 302 $this->appVersion = $appVersion; 303 } 304 305 /** 306 * @return String 307 */ 308 public function getAppVersion() 309 { 310 return $this->appVersion; 311 } 312 313 /** 314 * @param String $campaignContent 315 */ 316 public function setCampaignContent($campaignContent) 317 { 318 $this->campaignContent = $campaignContent; 319 } 320 321 /** 322 * @return String 323 */ 324 public function getCampaignContent() 325 { 326 return $this->campaignContent; 327 } 328 329 /** 330 * @param String $campaignID 331 */ 332 public function setCampaignID($campaignID) 333 { 334 $this->campaignID = $campaignID; 335 } 336 337 /** 338 * @return String 339 */ 340 public function getCampaignID() 341 { 342 return $this->campaignID; 343 } 344 345 /** 346 * @param String $campaignKeyword 347 */ 348 public function setCampaignKeyword($campaignKeyword) 349 { 350 $this->campaignKeyword = $campaignKeyword; 351 } 352 353 /** 354 * @deprecated Use setCampaignKeyword 355 * @param $campaignKeyword 356 */ 357 public function setCampaignKeywords($campaignKeyword) 358 { 359 if( is_array($campaignKeyword) ) 360 { 361 return $this->setCampaignKeyword(implode(',', $campaignKeyword)); 362 } 363 364 $this->setCampaignKeyword($campaignKeyword); 365 } 366 367 /** 368 * @return Array 369 */ 370 public function getCampaignKeyword() 371 { 372 return $this->campaignKeyword; 373 } 374 375 /** 376 * @param String $campaignMedium 377 */ 378 public function setCampaignMedium($campaignMedium) 379 { 380 $this->campaignMedium = $campaignMedium; 381 } 382 383 /** 384 * @return String 385 */ 386 public function getCampaignMedium() 387 { 388 return $this->campaignMedium; 389 } 390 391 /** 392 * @param String $campaignName 393 */ 394 public function setCampaignName($campaignName) 395 { 396 $this->campaignName = $campaignName; 397 } 398 399 /** 400 * @return String 401 */ 402 public function getCampaignName() 403 { 404 return $this->campaignName; 405 } 406 407 /** 408 * @param String $campaignSource 409 */ 410 public function setCampaignSource($campaignSource) 411 { 412 $this->campaignSource = $campaignSource; 413 } 414 415 /** 416 * @return String 417 */ 418 public function getCampaignSource() 419 { 420 return $this->campaignSource; 421 } 422 423 /** 424 * @param String $displayAdsID 425 */ 426 public function setDisplayAdsID($displayAdsID) 427 { 428 $this->displayAdsID = $displayAdsID; 429 } 430 431 /** 432 * @return String 433 */ 434 public function getDisplayAdsID() 435 { 436 return $this->displayAdsID; 437 } 438 439 /** 440 * @param String $documentEncoding 441 */ 442 public function setDocumentEncoding($documentEncoding) 443 { 444 $this->documentEncoding = $documentEncoding; 445 } 446 447 /** 448 * @return String 449 */ 450 public function getDocumentEncoding() 451 { 452 return $this->documentEncoding; 453 } 454 455 /** 456 * @param String $documentHost 457 */ 458 public function setDocumentHost($documentHost) 459 { 460 $this->documentHost = $documentHost; 461 } 462 463 /** 464 * @return String 465 */ 466 public function getDocumentHost() 467 { 468 return $this->documentHost; 469 } 470 471 /** 472 * @param String $documentLocation 473 */ 474 public function setDocumentLocation($documentLocation) 475 { 476 $this->documentLocation = $documentLocation; 477 } 478 479 /** 480 * @return String 481 */ 482 public function getDocumentLocation() 483 { 484 return $this->documentLocation; 485 } 486 487 /** 488 * @param String $documentPath 489 */ 490 public function setDocumentPath($documentPath) 491 { 492 $this->documentPath = $documentPath; 493 } 494 495 /** 496 * @return String 497 */ 498 public function getDocumentPath() 499 { 500 return $this->documentPath; 501 } 502 503 /** 504 * @param String $documentReferrer 505 */ 506 public function setDocumentReferrer($documentReferrer) 507 { 508 $this->documentReferrer = $documentReferrer; 509 } 510 511 /** 512 * @return String 513 */ 514 public function getDocumentReferrer() 515 { 516 return $this->documentReferrer; 517 } 518 519 /** 520 * @param String $documentTitle 521 */ 522 public function setDocumentTitle($documentTitle) 523 { 524 $this->documentTitle = $documentTitle; 525 } 526 527 /** 528 * @return String 529 */ 530 public function getDocumentTitle() 531 { 532 return $this->documentTitle; 533 } 534 535 /** 536 * @param String $experimentID 537 */ 538 public function setExperimentID($experimentID) 539 { 540 $this->experimentID = $experimentID; 541 } 542 543 /** 544 * @return String 545 */ 546 public function getExperimentID() 547 { 548 return $this->experimentID; 549 } 550 551 /** 552 * @param String $experimentVariant 553 */ 554 public function setExperimentVariant($experimentVariant) 555 { 556 $this->experimentVariant = $experimentVariant; 557 } 558 559 /** 560 * @return String 561 */ 562 public function getExperimentVariant() 563 { 564 return $this->experimentVariant; 565 } 566 567 /** 568 * @param String $flashVersion 569 */ 570 public function setFlashVersion($flashVersion) 571 { 572 $this->flashVersion = $flashVersion; 573 } 574 575 /** 576 * @return String 577 */ 578 public function getFlashVersion() 579 { 580 return $this->flashVersion; 581 } 582 583 /** 584 * @param boolean $javaEnabled 585 */ 586 public function setJavaEnabled($javaEnabled) 587 { 588 $this->javaEnabled = (bool) $javaEnabled; 589 } 590 591 /** 592 * @return boolean 593 */ 594 public function getJavaEnabled() 595 { 596 if( $this->javaEnabled === null ){ 597 return null; 598 } 599 600 return $this->javaEnabled ? '1' : '0'; 601 } 602 603 /** 604 * @param String $screenColors 605 */ 606 public function setScreenColors($screenColors) 607 { 608 $this->screenColors = $screenColors; 609 } 610 611 /** 612 * @return String 613 */ 614 public function getScreenColors() 615 { 616 return $this->screenColors; 617 } 618 619 /** 620 * @param $width 621 * @param $height 622 */ 623 public function setScreenResolution($width, $height) 624 { 625 $this->screenResolution = $width . 'x' . $height; 626 } 627 628 /** 629 * @return String 630 */ 631 public function getScreenResolution() 632 { 633 return $this->screenResolution; 634 } 635 636 /** 637 * @param String $userLanguage 638 */ 639 public function setUserLanguage($userLanguage) 640 { 641 $this->userLanguage = $userLanguage; 642 } 643 644 /** 645 * @return String 646 */ 647 public function getUserLanguage() 648 { 649 return $this->userLanguage; 650 } 651 652 /** 653 * @param $width 654 * @param $height 655 */ 656 public function setViewportSize($width, $height) 657 { 658 $this->viewportSize = $width . 'x' . $height; 659 } 660 661 /** 662 * @return String 663 */ 664 public function getViewportSize() 665 { 666 return $this->viewportSize; 667 } 668 669 /** 670 * @param string $productId 671 */ 672 public function setProductId($productId) 673 { 674 $this->productId = $productId; 675 } 676 677 /** 678 * @return string 679 */ 680 public function getProductId() 681 { 682 return $this->productId; 683 } 30 684 31 685 } -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/App/Event.php
r1045331 r1050283 2 2 namespace Racecore\GATracking\Tracking\App; 3 3 4 use Racecore\GATracking\Tracking\ AbstractTracking;4 use Racecore\GATracking\Tracking\Event as DefaultEvent; 5 5 6 6 /** … … 20 20 * @package Racecore\GATracking\Tracking\App 21 21 */ 22 class Event extends AbstractTracking22 class Event extends DefaultEvent 23 23 { 24 /** @var string */25 private $appName;26 27 /** @var string */28 private $eventCategory;29 30 /** @var string */31 private $eventAction;32 33 /**34 * Set the Application Name35 *36 * @param string $appName37 */38 public function setAppName($appName)39 {40 $this->appName = $appName;41 }42 43 /**44 * Get the Application Name45 *46 * @return string47 */48 public function getAppName()49 {50 return $this->appName;51 }52 53 /**54 * Set the Event Action55 *56 * @param string $eventAction57 */58 public function setEventAction($eventAction)59 {60 $this->eventAction = $eventAction;61 }62 63 /**64 * Get the Event Action65 *66 * @return string67 */68 public function getEventAction()69 {70 return $this->eventAction;71 }72 73 /**74 * Set the Event Category75 *76 * @param string $eventCategory77 */78 public function setEventCategory($eventCategory)79 {80 $this->eventCategory = $eventCategory;81 }82 83 /**84 * Get the Event Category85 *86 * @return string87 */88 public function getEventCategory()89 {90 return $this->eventCategory;91 }92 93 /**94 * Returns the Paket for App Event Tracking95 *96 * @return array97 */98 public function getPaket()99 {100 return array(101 't' => 'event',102 'an' => $this->getAppName(),103 'ec' => $this->getEventCategory(),104 'ea' => $this->getEventAction()105 );106 }107 24 } -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/App/Screen.php
r1045331 r1050283 22 22 class Screen extends AbstractTracking 23 23 { 24 /** @var string */25 private $appName;26 27 /** @var string */28 private $appVersion;29 30 /** @var string */31 private $contentDescription;32 33 /**34 * Set the Application Name35 *36 * @param string $appName37 */38 public function setAppName($appName)39 {40 $this->appName = $appName;41 }42 43 /**44 * Get the Application Name45 *46 * @return string47 */48 public function getAppName()49 {50 return $this->appName;51 }52 53 /**54 * Set the Application Version55 *56 * @param string $appVersion57 */58 public function setAppVersion($appVersion)59 {60 $this->appVersion = $appVersion;61 }62 63 /**64 * Get the Application Version65 *66 * @return string67 */68 public function getAppVersion()69 {70 return $this->appVersion;71 }72 73 /**74 * Set the Content Description/Screen Name75 *76 * @param string $contentDescription77 */78 public function setContentDescription($contentDescription)79 {80 $this->contentDescription = $contentDescription;81 }82 83 /**84 * Get the Content Description/Screen Name85 *86 * @return string87 */88 public function getContentDescription()89 {90 return $this->contentDescription;91 }92 93 24 /** 94 25 * Returns the Paket for App Screen Tracking … … 96 27 * @return array 97 28 */ 98 public function getPaket()29 public function createPackage() 99 30 { 100 31 return array( 101 32 't' => 'appview', 102 'an' => $this->getAppName(),103 'av' => $this->getAppVersion(),104 'cd' => $this->getContentDescription()105 33 ); 106 34 } -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Ecommerce/Item.php
r1045331 r1050283 33 33 34 34 /** 35 * @param $host 36 * @deprecated 37 */ 38 public function setTransactionHost( $host ) 39 { 40 return $this->setDocumentHost( $host ); 41 } 42 43 /** 35 44 * Set the Transaction ID 36 45 * 37 * @param $ id46 * @param $tid 38 47 */ 39 48 public function setTransactionID($tid) … … 184 193 } 185 194 186 public function setTransactionHost($host) 187 { 188 $this->host = $host; 189 return $this; 190 } 191 192 /** 193 * @return string 194 */ 195 public function getTransactionHost() 196 { 197 return $this->host; 198 } 199 200 /** 201 * Returns the Google Paket for Item Tracking 195 /** 196 * Create the Package 202 197 * 203 198 * @return array 204 */ 205 public function getPaket() 199 * @throws \Racecore\GATracking\Exception\MissingTrackingParameterException 200 */ 201 public function createPackage() 206 202 { 207 203 if( !$this->getTransactionID() ) … … 223 219 'ic' => $this->getSku(), 224 220 'iv' => $this->getCategory(), 225 'dh' => $this->getTransactionHost(),226 221 'cu' => $this->getCurrency() 227 222 ); -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Ecommerce/Transaction.php
r1045331 r1050283 30 30 private $tax = 0; 31 31 private $currency = ''; 32 private $host = ''; 32 33 /** 34 * @param $host 35 * @deprecated 36 */ 37 public function setTransactionHost( $host ) 38 { 39 return $this->setDocumentHost( $host ); 40 } 33 41 34 42 /** … … 161 169 162 170 /** 163 * Return the Transaction Host Address164 *165 * @param $host166 * @return $this167 */168 public function setTransactionHost($host)169 {170 $this->host = $host;171 return $this;172 }173 174 /**175 * Returns the Transaction Host176 *177 * @return string178 */179 public function getTransactionHost()180 {181 return $this->host;182 }183 184 /**185 171 * Returns the Google Paket for Transaction Tracking 186 172 * … … 188 174 * @throws \Racecore\GATracking\Exception\MissingTrackingParameterException 189 175 */ 190 public function getPaket()176 public function createPackage() 191 177 { 192 178 if( !$this->getID() ) … … 202 188 'ts' => $this->getShipping(), 203 189 'tt' => $this->getTax(), 204 'dh' => $this->getTransactionHost(),205 190 'cu' => $this->getCurrency() 206 191 ); -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Event.php
r1045331 r1050283 128 128 * @throws \Racecore\GATracking\Exception\MissingTrackingParameterException 129 129 */ 130 public function getPaket()130 public function createPackage() 131 131 { 132 132 if (!$this->getEventCategory()) { -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Exception.php
r1045331 r1050283 75 75 * @return array 76 76 */ 77 public function getPaket()77 public function createPackage() 78 78 { 79 79 return array( -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Page.php
r1045331 r1050283 20 20 class Page extends AbstractTracking 21 21 { 22 23 private $documentPath = '';24 private $host = '';25 private $title = '';26 27 /**28 * Set the Request Document Path29 *30 * @param $path31 */32 public function setDocumentPath($path)33 {34 35 $this->documentPath = $path;36 }37 38 /**39 * Returns the Request Document Path40 *41 * @return string42 */43 public function getDocumentPath()44 {45 46 if (!$this->documentPath) {47 return '/';48 }49 50 return $this->documentPath;51 }52 53 /**54 * Sets the Document Title in Analytics Report55 *56 * @param $title57 */58 public function setDocumentTitle($title)59 {60 61 $this->title = $title;62 }63 64 /**65 * Return Document Title66 *67 * @return string68 */69 public function getDocumentTitle()70 {71 72 return $this->title;73 }74 75 /**76 * Return the Document Host Adress77 *78 * @param $host79 * @return $this80 */81 public function setDocumentHost($host)82 {83 $this->host = $host;84 return $this;85 }86 87 /**88 * Return Document Host89 *90 * @return string91 */92 public function getDocumentHost()93 {94 return $this->host;95 }96 97 22 /** 98 23 * Returns the Google Paket for Campaign Tracking … … 100 25 * @return array 101 26 */ 102 public function getPaket()27 public function createPackage() 103 28 { 104 29 return array( 105 30 't' => 'pageview', 106 'dh' => $this->getDocumentHost(),107 'dp' => $this->getDocumentPath(),108 'dt' => $this->getDocumentTitle()109 31 ); 110 32 } 111 112 33 } -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/Social.php
r1045331 r1050283 102 102 * @throws \Racecore\GATracking\Exception\MissingTrackingParameterException 103 103 */ 104 public function getPaket()104 public function createPackage() 105 105 { 106 106 if (!$this->getSocialAction()) { -
gravity-forms-google-analytics-event-tracking/trunk/includes/vendor/ga-mp/src/Racecore/GATracking/Tracking/User/Timing.php
r1045331 r1050283 233 233 * @return array 234 234 */ 235 public function getPaket()235 public function createPackage() 236 236 { 237 237 return array(
Note: See TracChangeset
for help on using the changeset viewer.