WC_Tracks_Footer_Pixel::render_tracking_pixels()

Add events as tracking pixels to page footer.


Description Description


Source Source

File: includes/tracks/class-wc-tracks-footer-pixel.php

	public function render_tracking_pixels() {
		if ( empty( $this->events ) ) {
			return;
		}

		foreach ( $this->events as $event ) {
			$pixel = $event->build_pixel_url();

			if ( ! $pixel ) {
				continue;
			}

			echo '<img style="position: fixed;" src="', esc_url( $pixel ), '" />';
		}

		$this->events = array();
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.