You can get an eTA to Canada with a criminal record, however these must be non-serious offences only. If you have committed a serious offence, you cannot get an eTA to Canada.
Though, a speeding ticket or in the case of expiring the statute of limitations, you can still obtain your eTA permit. However, in that situation, you may be asked to send in some additional documents.