Use the Facebook event setup tool for web

After you’ve added your Facebook pixel base code to your website, you can use the event setup tool to set up standard events and parameters without the need to code. Only standard events are available now, and not custom events.

Before you begin

  • Check that your website has a Facebook pixel installed.
  • Make sure that you have admin permissions for the pixel.
  • Turn off ad blockers in your browser.
  • Make sure that your business is not in a regulated vertical.
  • To set up content ID and content type parameters, a unique product identifier should be available either in your web page text or web page URL. For example, a product SKU or UPC. Content ID and content type parameters are only available for view content, add to cart, initiate checkout, purchase, search, add to wishlist and lead events.

Note: Facebook does not currently allow businesses in the following regulated verticals to use the event setup tool: investment banking and brokerage, insurance, financial services, retail, credit union and commercial banking, credit, financing, mortgages, pharmaceutical and health. Businesses in these verticals can set up events manually instead.

To use the event setup tool:

  1. Sign in to your Ads Manager account.
  2. Select Events Manager in the main menu.
  3. Select the pixel that you’d like to use.
  4. Click Settings.
  5. Select Open event setup tool under Event setup.
  6. Enter your URL and click Open website. The event setup tool will launch in your website browser.
  7. Click Review by each suggested event and then select Confirm or Dismiss.
  8. To add events that don’t appear in your suggested list, navigate your website as usual to find the buttons or web pages that you want. Select Track new button or Track a URL and follow the on-screen instructions.Note: When you set up an event on a button, you’re adding the event to all buttons with the same or similar text on your website.
  9. Select an event.
  10. Set up parameters for your event.
  11. Click Finish setup in the event setup tool when you’ve finished.

To view your events, go to Events Manager, select your pixel and view your event graph and table. To test that your events are firing correctly, go to Events Manager, select your pixel, click the Test events tab and follow the instructions. Learn how to use the test events tool.

print index in php twig file

The `loop` variable

Inside of a for loop block you can access some special variables:

VariableDescription
loop.indexThe current iteration of the loop. (1 indexed)
loop.index0The current iteration of the loop. (0 indexed)
loop.revindexThe number of iterations from the end of the loop (1 indexed)
loop.revindex0The number of iterations from the end of the loop (0 indexed)
loop.firstTrue if first iteration
loop.lastTrue if last iteration
loop.lengthThe number of items in the sequence
loop.parentThe parent context
{% for user in users %}
    {{ loop.index }} - {{ user.username }}
{% endfor %}

how to show subscribers on youtube

You can choose to make which channels you’re subscribed to private or public. By default, all settings are set to private. 

  • Private: When your subscriptions are set to private, no other users can see what channels you subscribe to. Your account does not show in a channel’s Subscribers List, even if you’re subscribed. 
  • Public: When your subscriptions are set to public, other users can see what channels you subscribe to. Your subscriptions are listed on your channel homepage. Your account is listed in the Subscribers List for any channel you subscribe to. 

Make your channel subscriptions public or private

  1. Sign in to YouTube.
  2. In the top right, click your profile picture .
  3. Click Settings Settings. 
  4. In the left Menu, select Privacy.
  5. Turn on or off Keep all my subscriptions private.

Hide your subscriber count 

By hiding your subscriber count, it won’t be publicly visible to others on YouTube. You can still see your subscriber count from YouTube Studio.

  1. Sign in to your Google Account.
  2. Go to YouTube Studio.
  3. Click Settings and then Channel and then Advanced settings.
  4. Under “Subscriber count,” uncheck “Display the number of people subscribed to my channel.”
  5. Click Save.

Email not working in CI

 $this->load->library('email');

$config['protocol']    = 'smtp';
$config['smtp_host']    = 'tls://smtp.mail.net';
$config['smtp_port']    = '465';
$config['smtp_timeout'] = '10';
$config['smtp_user']    = 'apikey';
$config['smtp_pass']    = 'SG..FRzo2eJ4e6kMPH_nadeghjdddjkkDgBOaZwX6NrPYav6eEPHUM7FNpD58';
$config['charset']    = 'utf-8';
$config['newline']    = "\r\n";
$config['mailtype'] = 'html'; // or html
$config['validation'] = TRUE; // bool whether to validate email or not   
$config['wordwrap'] = TRUE;
$config['wrapchars'] = 76;  

$this->email->initialize($config);

$this->email->from('aditya@soatechnology.net', 'Laughing Adda');
$this->email->to($email); 
$this->email->subject($email_template->title);
$this->email->message($email_template->message);  

$this->email->send();

echo $this->email->print_debugger();

Multi-factor Authentication for AWS

AWS Multi-Factor Authentication (MFA) is a simple best practice that adds an extra layer of protection on top of your user name and password. With MFA enabled, when a user signs in to an AWS Management Console, they will be prompted for their user name and password (the first factor—what they know), as well as for an authentication code from their AWS MFA device (the second factor—what they have). Taken together, these multiple factors provide increased security for your AWS account settings and resources.

You can enable MFA for your AWS account and for individual IAM users you have created under your account. MFA can be also be used to control access to AWS service APIs.

After you’ve obtained a supported hardware or virtual MFA device, AWS does not charge any additional fees for using MFA.

Virtual MFA Applications

Applications for your smartphone can be installed from the application store that is specific to your phone type. The following table lists some applications for different smartphone types.

 AndroidAuthy, Duo Mobile, LastPass Authenticator, Microsoft Authenticator, Google Authenticator
 iPhoneAuthy, Duo Mobile, LastPass Authenticator, Microsoft Authenticator, Google Authenticator

source:https://aws.amazon.com/iam/features/mfa/?audit=2019q1

how to change email id in ubuntu server

By default, any email sent by system is sent to root@hostname. So critical server errors, log errors, corn jobs alerts e.t.c all are sent to this default email address. To change it to different appropriate email id, we can do this by two ways.

By updating email aliases file:

For this example, lets set email to system@mydomain.com

Step 1 : edit /etc/aliases file 

$ vi /etc/aliases

Add email ids at the bottom of the file.

postmaster: system@mydmomain.com

To add multiple email ids, we can simply separate them by comma.

postmaster: system@mydomain.com, linux@mydomain.com

linux@mydomain.com is second email id 

Step 2: Run the aliases command, to compile aliases file. 

$ newaliases

Step 3: Restart postfix server.

service postfix restart

Second way:

We can simply create .forward file to the folder root and add email address there.

$ vi /root/.forward
system@mydomain.com

Restart postfix server
$ service postfix restart.

How to change phpmyadmin url of ubuntu aws server

How to change phpmyadmin url of ubuntu aws server

http://www.domain.in/dbaditya/

this is the url

in this video we change dbaditya to newname

  1. login into server using putty
  2. cd /etc
  3. cd phpmyadmin
  4. ls
  5. sudo nano apache.conf
  6. modify this line Alias /dbaditya /usr/share/phpmyadmin
  7. ctrl + x and press y for exit
  8. sudo service apache2 restart for restart the apache service

Note: top command to show process monitor of server

q used for quit from top command window/screen

http://www.domain.in/mynewdata/
Done URL succcessfully changed