Install guide

  • install code: vpon will provide code, please refer to the example code below, there will be mutiple event codes, please embed the match one
  • install page: page specific in vpon provide code
  • install position: specific event trigger function
  • fill-in fields: there will be some fill-in fields, represented in form like [value-name], vpon will provide value detail and example

Example

Example Code

Example code
* install position: in all "add to card" button click function
* ref:
	item_name: product name, value type: string
	item_price: product price, like 10.00, value type: number (int or float)
	currency: currency of item price represent in ISO 4217 currency code form, please reference to https://en.wikipedia.org/wiki/ISO_4217#Activecodes
* example:
	Vpadn("add_to_cart",{ 
		"item_name": "Scoop Back Skater Dress",
		"item_price": 10.00,
		"currency": "TWD"
	});

* code:
----------------------
<script>
//----- !!NOTE!! all [] value should be replaced with actually value ------
Vpadn("add_to_cart",{ 
	"item_name": [item_name],
	"item_price": [item_price],
	"currency": [currency]
});
</script>
-----------------------

Example Page

This is an example page, the original content is as below:

Original example page
<!DOCTYPE html>
<html>
	<head>
		...
	</head>
<body>
	<!-- part of your html content here -->
	
	<!-- an example button -->
	<a href="http://www.somedomain.com/shopcart">add to cart</a>
	
	<!-- part of your html content here -->
</body>
</html>

Modified example page:

  • add base code
  • add events
  • fill value in
  • set some timeout before redirect to the target url to make sure the code is sent

Modified example page
<!DOCTYPE html>
<html>
	<head>
		...
		<!-- base code content here -->
	</head>
<body>
	<!-- part of your html content here -->

	<!-- an example button -->
	<a onclick="onAddToCartClick();">add to cart</a>
	
	<script>
	function onAboutClick(){
		//vpon event code
		//fill in data of current viewing product
		Vpadn("add_to_cart",{ 
			"item_name": "Lace Up Midi Dress",
			"item_price": 16.00,
			"currency": "USD"
		});

		//go to link page after a short timeout
		setTimeout( function(){
			location.href = "http://www.somedomain.com/shopcart";
		}, 700);
	}
	</script>

	<!-- part of your html content here -->
</body>
</html>