Last active
June 20, 2017 15:35
-
-
Save awayken/ce8dc813e911549352f96daaf4f9490b to your computer and use it in GitHub Desktop.
A Technique for Tracking Prints Using CSS: http://wp.me/pcVrg-XF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
param name='args.qrURL' default=prc.page.getCanonical(); | |
</cfscript> | |
<cfoutput> | |
<div class="u--printonly detail--trackprint"> | |
<p>#_('qrcode_explanation', 'Scan the following QR code to learn more.')#</p> | |
<img class="u--box" src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=#HTMLEditFormat( args.qrURL )#" alt=""> | |
<p>(#HTMLEditFormat( args.qrURL )#)</p> | |
<img src="?trackprint" alt=""> | |
</div> | |
</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media print { | |
.detail--trackprint { | |
background: url("?trackprint"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
param name='args.qrURL' default=prc.page.getCanonical(); | |
</cfscript> | |
<cfoutput> | |
<div class="u--printonly detail--trackprint"> | |
<style>@media print { .detail--trackprint { background: url("?trackprint"); } }</style> | |
<p>#_('qrcode_explanation', 'Scan the following QR code to learn more.')#</p> | |
<img class="u--box" src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=#HTMLEditFormat( args.qrURL )#" alt=""> | |
<p>(#HTMLEditFormat( args.qrURL )#)</p> | |
</div> | |
</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
param name='args.qrURL' default=prc.page.getCanonical(); | |
</cfscript> | |
<cfoutput> | |
<div class="u--printonly detail--trackprint"> | |
<style>@media print { .detail--trackprint { background: url("?trackprint=#URLEncodedFormat( now() )#"); } }</style> | |
<p>#_('qrcode_explanation', 'Scan the following QR code to learn more.')#</p> | |
<img class="u--box" src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=#HTMLEditFormat( args.qrURL )#" alt=""> | |
<p>(#HTMLEditFormat( args.qrURL )#)</p> | |
</div> | |
</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
property name='id' type='numeric' default=0; | |
property name='model' inject='model:inventoryModel'; | |
public any function trackPrint() { | |
getModel().trackPrint( getId() ); | |
var trackingPixel = imageRead(expandPath('/images/transparent.gif')); | |
return trackingPixel; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment